We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.app.js中:
var helper = require('./routes/helper'); app.use('/helper', helper); app.locals.inspect = function(obj) { return util.inspect(obj, true) + '解析成功'; }; app.locals.headers = function(req, res) { return util.inspect(req.headers, true) +'解析成功动态视图助手' }
2.在helper.js中
var express = require('express'); var router = express.Router(); router.get('/', function(req, res) { res.render('helper', { title: 'help', _req: req, _res: res }); }); module.exports = router;
3.在helper.ejs中:
<%= inspect.headers(_req, _res) %>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
1.app.js中:
2.在helper.js中
3.在helper.ejs中:
<%= inspect.headers(_req, _res) %>
The text was updated successfully, but these errors were encountered: