From 063697c20a1ea4aa0dfa7ba501ad52077f70cc10 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Thu, 29 Jul 2021 00:52:41 +0800 Subject: [PATCH] set the port by env.PORT, specific node version in package.json --- package.json | 3 +++ server/server.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e3d6b46d..df39d0cf 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,9 @@ "type": "git", "url": "https://github.com/louislam/uptime-kuma.git" }, + "engines": { + "node": ">=14" + }, "scripts": { "dev": "vite --host", "start": "npm run start-server", diff --git a/server/server.js b/server/server.js index 1b5f88fc..70198015 100644 --- a/server/server.js +++ b/server/server.js @@ -20,7 +20,7 @@ const { login } = require("./auth"); const passwordHash = require("./password-hash"); const version = require("../package.json").version; const hostname = args.host || "0.0.0.0" -const port = args.port || 3001 +const port = process.env.PORT || args.port || 3001 console.info("Version: " + version)