From 789845399088127cf8ba123e4808ebcd4018a70a Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Sun, 30 Jul 2023 11:47:58 +0100 Subject: [PATCH] chore: add PORT env variable --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 0518145..c9ddd8b 100644 --- a/server.js +++ b/server.js @@ -4,7 +4,7 @@ const next = require("next"); const dev = process.env.NODE_ENV !== "production"; const hostname = "localhost"; -const port = 3000; +const port = process.env.PORT ?? 3000; // when using middleware `hostname` and `port` must be provided below const app = next({ dev, hostname, port }); const handle = app.getRequestHandler();