Making server port configurable

This commit is contained in:
Eric Herbrandson
2020-07-28 08:46:21 -05:00
parent 44a61b2cb2
commit 03e9a1cf9e
2 changed files with 4 additions and 2 deletions
+1
View File
@@ -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)
+3 -2
View File
@@ -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');