From 243f43ebc6f5be2ba12d462a496e363e6cbf3da9 Mon Sep 17 00:00:00 2001 From: Justin Colangelo Date: Thu, 11 Aug 2022 14:30:44 -0400 Subject: [PATCH] add port option for startup --- README.md | 2 ++ app/src/config.template.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6faa3912..08d6152e 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,8 @@ $ cp app/src/config.template.js app/src/config.js $ npm install # Start the server $ npm start +# If you want to start the server on a different port than the default use an env var +$ PORT=3011 npm start ``` - Open https://localhost:3010 in browser diff --git a/app/src/config.template.js b/app/src/config.template.js index 386f4711..932da43b 100644 --- a/app/src/config.template.js +++ b/app/src/config.template.js @@ -32,7 +32,7 @@ module.exports = { hostPassword: 'password', // app listen on listenIp: '0.0.0.0', - listenPort: 3010, + listenPort: process.env.PORT || 3010, // ssl/README.md sslCrt: '../ssl/cert.pem', sslKey: '../ssl/key.pem',