From 14caed5d15b3601bb91a5f4a688fbdfba38cf321 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Mon, 18 Jun 2018 16:17:23 -0400 Subject: updates --- finished-application/backend/src/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'finished-application/backend/src/index.js') 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}`); -- cgit v1.3