Saturday, 22 April 2017

How to control flow based on if user is logged in or not?

APP.GET('/', isLoggedIn, function(req, res) { if (isLoggedIn){res.render(index) else { res.render(index-authed)} });

how do i check what isLoggedIn returns? so i can handle flow like this?



via rvncpn

No comments:

Post a Comment