Created
July 7, 2018 03:55
-
-
Save philipimperato/1f99ed49204ac674c9749014e471a688 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* this is the first route hit */ | |
routeConfig.all('/*', (req, res, next) => { | |
req.sessionStore.get(req.session.id, (err, sess) => { | |
/* sess.user is set on login */ | |
if (sess && sess.user) { | |
/* logged in */ | |
} else { | |
/* not logged in */ | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment