javascript - How to access res.locals on client-side -


i'm attempting pass req.user details client-side angular code using res.locals in express route:

'use strict';  var path = require('path');  var player = function(req, res) {   res.locals.player = req.player;   res.sendfile(path.join(__dirname, '../assets', 'index.html')); };  module.exports = {   player: player }; 

the html renders expected, i'm not sure how access res.locals.player now.


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -