From 0fe8294f9cfe7b1b1a21ad6522dc3cb5e9b1b5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Valeria=20Vanegas=20Garc=C3=ADa?= Date: Tue, 18 Sep 2018 07:54:10 -0500 Subject: [PATCH] Port as environment variable --- back/REST/xpress/index.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/back/REST/xpress/index.mjs b/back/REST/xpress/index.mjs index c368ffd..cce3cc6 100644 --- a/back/REST/xpress/index.mjs +++ b/back/REST/xpress/index.mjs @@ -16,6 +16,7 @@ app.use("/story", story); app.use("/rating", rating); app.use("/user", user); -const port = 8080; +// Use port as a environment variable. Add a config file +const port = process.env.PORT; -app.listen(port, () => console.log("Narrario back listening on port " + port + "!")); \ No newline at end of file +app.listen(port, () => console.log("Narrario back listening on port " + port + "!"));