Skip to content

Commit 5b31c66

Browse files
authored
Use process port if available (#13)
* - Use process port if available * - Make sure console log identifies correct port being used. * - Have app listen to defined port
1 parent ee761af commit 5b31c66

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

api/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ app.all("/*", (req, res) => {
9090
});
9191
//For example in Express you may want to use: res.send(noncifiedHTML);
9292

93-
app.listen(8080, () => {
94-
console.log("Financier frontend listening on port 8080!");
93+
const port = process.env.PORT || 8080;
94+
95+
app.listen(port, () => {
96+
console.log(`Financier frontend listening on port ${port}!`);
9597
});

0 commit comments

Comments
 (0)