ExpressJS Nasıl?
21 Kas 2016res.locals
An object that contains response local variables scoped to the request, and therefore available only to the view(s) rendered during that request / response cycle (if any).
This property is useful for exposing request-level information such as the request path name, authenticated user, user settings, and so on.12345app.use(function(req, res, next){ res.locals.user = req.user; res.locals.authenticated = ! req.user.anonymous; next();});