From ba16ce3b92379c31afd060fa5b7c1e3a37aac995 Mon Sep 17 00:00:00 2001 From: LarsVomMars Date: Sat, 10 Oct 2020 01:07:44 +0200 Subject: env Port --- .env.example | 1 + app.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index ef55330..febc0cd 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,4 @@ +PORT= DBHost= DBName= DBUser= diff --git a/app.js b/app.js index fcb7a8a..442ac13 100644 --- a/app.js +++ b/app.js @@ -34,4 +34,4 @@ app.use("/quotes", checkUser, quotes); app.use("/poll", checkUser, poll); app.use("/auth", auth); -app.listen(5005, () => console.log("Server started on http://localhost:5005")); +app.listen(process.env.PORT || 5005, () => console.log("Server started on http://localhost:5005")); -- cgit v1.2.3