From a3029edfb5259eae88befb8677fa3d5d46538d8d Mon Sep 17 00:00:00 2001 From: Louis Guitton Date: Sat, 26 Sep 2020 11:28:42 +0200 Subject: [PATCH] Bind the node.js app to the port provided by Heroku via the `$HOST` env var. References: - https://help.heroku.com/P1AVPANS/why-is-my-node-js-app-crashing-with-an-r10-error - https://github.com/mikecao/umami/pull/135 - https://github.com/vercel/next.js/issues/10338 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ed4e470d..b3e0a17d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "scripts": { "dev": "next dev", "build": "npm-run-all build-tracker build-lang build-db build-app", - "start": "next start", + "start": "next start -p ${PORT-3000}", "build-app": "next build", "build-tracker": "rollup -c rollup.tracker.config.js", "build-db": "npm-run-all copy-db-schema build-db-client",