summaryrefslogtreecommitdiffstats
path: root/finished-application/backend/src/index.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-06-18 16:17:23 -0400
committerWes Bos <wesbos@gmail.com>2018-06-18 16:17:23 -0400
commit14caed5d15b3601bb91a5f4a688fbdfba38cf321 (patch)
treeeea3604dcda517832fc60120bb38c69430f8d17d /finished-application/backend/src/index.js
parente9682b7b418eaf77bc2137e81edf32786e2ca1d3 (diff)
updates
Diffstat (limited to 'finished-application/backend/src/index.js')
-rw-r--r--finished-application/backend/src/index.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/finished-application/backend/src/index.js b/finished-application/backend/src/index.js
index 94911ec..2a1b433 100644
--- a/finished-application/backend/src/index.js
+++ b/finished-application/backend/src/index.js
@@ -22,7 +22,10 @@ server.express.use((req, res, next) => {
// 2. Get User from their ID
server.express.use(async (req, res, next) => {
if (!req.userId) return next();
- const user = await db.query.user({ where: { id: req.userId } }, `{ id, permissions, email, name }`);
+ const user = await db.query.user(
+ { where: { id: req.userId } },
+ `{ id, permissions, email, name }`
+ );
req.user = user;
next();
});
@@ -33,7 +36,7 @@ server.start(
credentials: true,
origin: process.env.FRONTEND_URL,
},
- port: 4444,
+ port: process.env.PORT,
},
deets => {
console.log(`Server is running on http://localhost:${deets.port}`);