simply use a ‘script’ tag with a dot after.
script.
var users = !{JSON.stringify(users).replace(/<\//g, "<\\/")}
https://github.com/pugjs/pug/blob/master/packages/pug/examples/dynamicscript.pug
More Related Contents:
- How can I get Express to output nicely formatted HTML?
- Use a variable in a Jade include
- Error: Failed to lookup view in Express
- Is there any way to use multiple view engines with Express + Node.js
- Push items into mongo array via mongoose
- How to share sessions with Socket.IO 1.x and Express 4.x?
- How can I set NODE_ENV=production on Windows?
- What does body-parser do with express?
- Node/Express file upload
- Order of router precedence in express.js
- How to modify the nodejs request default timeout time?
- What is the difference between res.end() and res.send()?
- Redirecting to previous page after authentication in node.js using passport.js
- What are “res” and “req” parameters in Express functions?
- What is a good session store for a single-host Node.js production app?
- 502 Bad Gateway Deploying Express Generator Template on Elastic Beanstalk
- Does Express.js support sending unbuffered progressively flushed responses?
- Node + Express + Passport: req.user Undefined
- Error “npm WARN package.json: No repository field”
- How to fix ‘Error: querySrv EREFUSED’ when connecting to MongoDB Atlas?
- Express.js req.ip is returning ::ffff:127.0.0.1
- What is the difference between res.send and res.write in express?
- What is best way to handle global connection of Mongodb in NodeJs
- Call a “local” function within module.exports from another function in module.exports?
- Model.find() returns empty in mongoose [duplicate]
- Difference between `npm start` & `node app.js`, when starting app?
- How to use socket.io in express routes?
- Express Router undefined params with router.use when split across files
- Connect or Express middleware to modify the response.body [closed]
- Using multiple parameters in URL in express