We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a0ae95 commit 2e37ef8Copy full SHA for 2e37ef8
server.js
@@ -2,6 +2,7 @@ const { createServer } = require('http');
2
const { parse } = require('url');
3
const next = require('next');
4
5
+const port = process.env.PORT || 3000
6
const dev = process.env.NODE_ENV !== 'production';
7
const app = next({ dev });
8
@@ -14,9 +15,9 @@ app.prepare().then(() => {
14
15
query.pathName = pathname;
16
17
app.render(req, res, '/index', query);
- }).listen(80, (err) => {
18
+ }).listen(port, (err) => {
19
if (err) throw err;
20
// eslint-disable-next-line no-console
- console.log('> Ready on http://localhost:80');
21
+ console.log(`> Ready on http://localhost:${port}`);
22
});
23
0 commit comments