Spaces:
Running
Running
Commit
·
f39824b
1
Parent(s):
00765bc
Fix frontend path for esbuild bundle location
Browse filesCo-Authored-By: Claude <noreply@anthropic.com>
trigo-web/backend/src/server.ts
CHANGED
|
@@ -69,7 +69,8 @@ app.use(express.json());
|
|
| 69 |
|
| 70 |
// Serve static files from frontend build (for production)
|
| 71 |
if (process.env.NODE_ENV === "production") {
|
| 72 |
-
|
|
|
|
| 73 |
app.use(express.static(frontendPath));
|
| 74 |
|
| 75 |
// Serve index.html for all routes (SPA support)
|
|
|
|
| 69 |
|
| 70 |
// Serve static files from frontend build (for production)
|
| 71 |
if (process.env.NODE_ENV === "production") {
|
| 72 |
+
// With esbuild bundle at backend/dist/server.js, go up 2 levels then into app/dist
|
| 73 |
+
const frontendPath = path.join(__dirname, "../../app/dist");
|
| 74 |
app.use(express.static(frontendPath));
|
| 75 |
|
| 76 |
// Serve index.html for all routes (SPA support)
|