Pokaż Profil użytkownika Nodejs
app.use(function(req, res, next){
res.locals.user = req.user;
next();
});
Breakable Barracuda
app.use(function(req, res, next){
res.locals.user = req.user;
next();
});
router.get('/profile', function(req, res, next) {
res.render('profile', { title: 'profile', user: req.user });
});
if user
p Hello, #{user.id}, good to see you!
else
p Please log in...