Spaces:
Running
Running
Commit
·
0101721
1
Parent(s):
466436b
deploy
Browse files
trigo-web/backend/package.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
| 2 |
"name": "trigo-backend",
|
| 3 |
"version": "1.0.0",
|
| 4 |
"description": "Backend server for Trigo game",
|
| 5 |
-
"main": "dist/server.js",
|
| 6 |
"scripts": {
|
| 7 |
"dev": "nodemon --watch src --exec ts-node src/server.ts",
|
| 8 |
"build": "tsc",
|
| 9 |
-
"start": "node dist/server.js",
|
| 10 |
"test": "echo \"Error: no test specified\" && exit 1"
|
| 11 |
},
|
| 12 |
"keywords": [
|
|
|
|
| 2 |
"name": "trigo-backend",
|
| 3 |
"version": "1.0.0",
|
| 4 |
"description": "Backend server for Trigo game",
|
| 5 |
+
"main": "dist/backend/src/server.js",
|
| 6 |
"scripts": {
|
| 7 |
"dev": "nodemon --watch src --exec ts-node src/server.ts",
|
| 8 |
"build": "tsc",
|
| 9 |
+
"start": "node dist/backend/src/server.js",
|
| 10 |
"test": "echo \"Error: no test specified\" && exit 1"
|
| 11 |
},
|
| 12 |
"keywords": [
|
trigo-web/backend/src/server.ts
CHANGED
|
@@ -25,7 +25,7 @@ app.use(express.json());
|
|
| 25 |
|
| 26 |
// Serve static files from frontend build (for production)
|
| 27 |
if (process.env.NODE_ENV === "production") {
|
| 28 |
-
const frontendPath = path.join(__dirname, "
|
| 29 |
app.use(express.static(frontendPath));
|
| 30 |
|
| 31 |
// Serve index.html for all routes (SPA support)
|
|
|
|
| 25 |
|
| 26 |
// Serve static files from frontend build (for production)
|
| 27 |
if (process.env.NODE_ENV === "production") {
|
| 28 |
+
const frontendPath = path.join(__dirname, "../../../../app/dist");
|
| 29 |
app.use(express.static(frontendPath));
|
| 30 |
|
| 31 |
// Serve index.html for all routes (SPA support)
|