1
0
Fork 0

chore: add PORT env variable

fix-1
Paul Makles 2023-07-30 11:47:58 +01:00
parent 0a3782946e
commit 7898453990
No known key found for this signature in database
GPG Key ID: 5059F398521BB0F6
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ const next = require("next");
const dev = process.env.NODE_ENV !== "production"; const dev = process.env.NODE_ENV !== "production";
const hostname = "localhost"; const hostname = "localhost";
const port = 3000; const port = process.env.PORT ?? 3000;
// when using middleware `hostname` and `port` must be provided below // when using middleware `hostname` and `port` must be provided below
const app = next({ dev, hostname, port }); const app = next({ dev, hostname, port });
const handle = app.getRequestHandler(); const handle = app.getRequestHandler();