check, can we force feed the port via a env var?

This commit is contained in:
Leo jPod 2019-10-01 20:37:24 +02:00
parent 53d31860d0
commit 63477bbd05
No known key found for this signature in database
GPG Key ID: C7F6D47D5A5F5213

View File

@ -51,8 +51,9 @@ function start({ routes, debug, manifestConfig }) {
});
});
app.listen(3000, () =>
console.log("🚀 elm-pages develop on http://localhost:3000")
const port = $.process.PORT || 3000;
app.listen(port, () =>
console.log("🚀 elm-pages develop on http://localhost:port")
);
// https://stackoverflow.com/questions/43667102/webpack-dev-middleware-and-static-files
// app.use(express.static(__dirname + "/path-to-static-folder"));