Skip to content

Commit

Permalink
fix frontend path
Browse files Browse the repository at this point in the history
  • Loading branch information
vmaubert committed Dec 26, 2024
1 parent e582565 commit a0b3a34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"server-local": "npm run dev",
"start-local": "run-p frontend:start server-local",
"clean": "rimraf dist",
"build": "npm run migrate-latest && tsc && npm run frontend:build",
"start": "node --enable-source-maps -r dotenv/config --loader ts-node/esm/transpile-only ./server/index.ts",
"build": "tsc && npm run frontend:build",
"start": "npm run migrate-latest && node --enable-source-maps -r dotenv/config --loader ts-node/esm/transpile-only ./server/index.ts",
"test": "vitest",
"test:integration": "vitest --project integration",
"test:unit": "vitest --project unit",
Expand Down
4 changes: 2 additions & 2 deletions server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ export function createServer(): Server {
app.use('/api', protectedRouter);

if (config.environment === 'production') {
app.use(express.static(path.join(import.meta.dirname, '../../frontend/build')));
app.use(express.static(path.join(import.meta.dirname, '../frontend/build')));
app.get('*', function (req: any, res: { sendFile: (arg0: any) => void }) {
res.sendFile(path.join(import.meta.dirname, '../../frontend/build', 'index.html'));
res.sendFile(path.join(import.meta.dirname, '../frontend/build', 'index.html'));
});
}

Expand Down

0 comments on commit a0b3a34

Please sign in to comment.