diff --git a/ponyracer/package.json b/ponyracer/package.json index a98791c..907623b 100644 --- a/ponyracer/package.json +++ b/ponyracer/package.json @@ -30,15 +30,15 @@ "@angular/platform-browser": "^20.3.0", "@angular/platform-server": "^20.3.0", "@angular/router": "^20.3.0", - "@angular/ssr": "^20.3.3", + "@angular/ssr": "^20.3.4", "express": "^5.1.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.15.0" }, "devDependencies": { - "@angular/build": "^20.3.3", - "@angular/cli": "^20.3.3", + "@angular/build": "^20.3.4", + "@angular/cli": "^20.3.4", "@angular/compiler-cli": "^20.3.0", "@types/express": "^5.0.1", "@types/jasmine": "~5.1.0", diff --git a/ponyracer/src/server.ts b/ponyracer/src/server.ts index e6546c4..4bf0631 100644 --- a/ponyracer/src/server.ts +++ b/ponyracer/src/server.ts @@ -48,10 +48,10 @@ app.use((req, res, next) => { }); /** - * Start the server if this module is the main entry point. + * Start the server if this module is the main entry point, or it is ran via PM2. * The server listens on the port defined by the `PORT` environment variable, or defaults to 4000. */ -if (isMainModule(import.meta.url)) { +if (isMainModule(import.meta.url) || process.env['pm_id']) { const port = process.env['PORT'] || 4000; app.listen(port, (error) => { if (error) {