@monodog/backend 1.1.16 → 1.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1126,6 +1126,16 @@ function startServer(rootPath) {
1126
1126
  process.exit(1);
1127
1127
  }
1128
1128
  });
1129
+ const appD = (0, express_1.default)();
1130
+ // Serve static files from the 'dist' directory
1131
+ appD.use(express_1.default.static(rootPath + '/apps/dashboard/dist'));
1132
+ // For any other routes, serve the index.html
1133
+ appD.get('*', (req, res) => {
1134
+ res.sendFile(path_1.default.join(rootPath, '/apps/dashboard/dist', 'index.html'));
1135
+ });
1136
+ appD.listen(3000, () => {
1137
+ console.log(`dashboard Server listening at http://localhost:${3000}`);
1138
+ });
1129
1139
  // export default app;
1130
1140
  // const overallScore =
1131
1141
  // healthMetrics.reduce((sum, h) => sum + h.health!.overallScore, 0) /
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monodog/backend",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "Backend API server for monodog monorepo dashboard",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -1298,7 +1298,18 @@ app.listen(PORT, () => {
1298
1298
  process.exit(1);
1299
1299
  }
1300
1300
  });
1301
+ const appD = express();
1302
+ // Serve static files from the 'dist' directory
1303
+ appD.use(express.static(rootPath + '/apps/dashboard/dist'));
1301
1304
 
1305
+ // For any other routes, serve the index.html
1306
+ appD.get('*', (req, res) => {
1307
+ res.sendFile(path.join(rootPath, '/apps/dashboard/dist', 'index.html'));
1308
+ });
1309
+
1310
+ appD.listen(3000, () => {
1311
+ console.log(`dashboard Server listening at http://localhost:${3000}`);
1312
+ });
1302
1313
  // export default app;
1303
1314
 
1304
1315
  // const overallScore =