mirror of
https://github.com/mblanke/Gov_Travel_App.git
synced 2026-03-01 14:10:22 -05:00
feat: add scripts for database inspection and migration
- Implemented multiple scripts to check and inspect meal plans, scraped data, and accommodations for Munich and Riga. - Added a migration script to convert scraped data into the application's database format. - Introduced new database service methods for querying and updating travel rates. - Enhanced server configuration for serving static files in production. - Updated PostCSS configuration for consistency.
This commit is contained in:
15
server.js
15
server.js
@@ -81,12 +81,17 @@ app.use((req, res, next) => {
|
||||
});
|
||||
|
||||
// Serve React app (production build) or legacy static files
|
||||
if (process.env.NODE_ENV === 'production' && require('fs').existsSync(path.join(__dirname, 'dist', 'client'))) {
|
||||
if (
|
||||
process.env.NODE_ENV === "production" &&
|
||||
require("fs").existsSync(path.join(__dirname, "dist", "client"))
|
||||
) {
|
||||
// Serve React production build
|
||||
app.use(express.static(path.join(__dirname, 'dist', 'client'), {
|
||||
maxAge: '1d',
|
||||
etag: true,
|
||||
}));
|
||||
app.use(
|
||||
express.static(path.join(__dirname, "dist", "client"), {
|
||||
maxAge: "1d",
|
||||
etag: true,
|
||||
})
|
||||
);
|
||||
} else {
|
||||
// Serve legacy static files from the current directory
|
||||
app.use(
|
||||
|
||||
Reference in New Issue
Block a user