From 03e9a1cf9ec714371c167330b6aa727dd764ebdd Mon Sep 17 00:00:00 2001 From: Eric Herbrandson Date: Tue, 28 Jul 2020 08:46:21 -0500 Subject: [PATCH] Making server port configurable --- README.md | 1 + server/index.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 13eb0b7..eacb37e 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ K8Dash is the easiest way to manage your Kubernetes cluster. Why? * Blazing fast and Always Live: no need to refresh pages to see the latest * Quickly visualize cluster health at a glance: Real time charts help quickly track down poorly performing resources * Easy CRUD and scaling: plus inline API docs to easily understand what each field does +* 100% responsive (runs on your phone/tablet) * Simple OpenID integration: no special proxies required * Simple installation: use the provided yaml resources to have K8Dash up and running in under 1 minute (no, seriously) diff --git a/server/index.js b/server/index.js index 33adb97..46b910c 100644 --- a/server/index.js +++ b/server/index.js @@ -53,8 +53,9 @@ app.post('/oidc', postOidc); app.use('/*', proxy(proxySettings)); app.use(handleErrors); -http.createServer(app).listen(4654); -console.log('Server started'); +const port = process.env.SERVER_PORT || 4654; +http.createServer(app).listen(port); +console.log(`Server started. Listening on port ${port}`); function preAuth(req, res, next) { const auth = req.header('Authorization');