Skip to content

Commit 161e74a

Browse files
committed
servert ts port extra fix
1 parent debe46e commit 161e74a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const hash = mainFiles[0].split('.')[1];
3535
const { AppServerModuleNgFactory, LAZY_MODULE_MAP } = require(`./dist-server/main.${hash}`);
3636
import { ngExpressEngine } from '@nguniversal/express-engine';
3737
import { REQUEST, RESPONSE } from '@nguniversal/express-engine/tokens';
38-
const PORT = 4000;
38+
const PORT = process.env.PORT || 4000;
3939

4040
enableProdMode();
4141

@@ -123,6 +123,6 @@ app.get('*', (req, res) => {
123123
});
124124
});
125125

126-
app.listen(process.env.PORT, () => {
126+
app.listen(PORT, () => {
127127
console.log(`listening on http://localhost:${PORT}!`);
128128
});

0 commit comments

Comments
 (0)