Oct 12, 2017 11:00 AM
(This post was last modified: Oct 12, 2017 11:08 AM by Skidy.)
I have seen this alot:
OR
https://expressjs.com/en/4x/api.html#res.render - This still confuses me. As I start my server like so:
How do I dynamically update something on a page from the Node server?
Oh and I do not want to use sockets for this.
https://www.npmjs.com/package/ejs doesn't uise the same syntax as {{ }}
Code
<b>Name: </b>{{=it.something.created}} <i>{{=it.game.lads}}</i>OR
Code
res.renderhttps://expressjs.com/en/4x/api.html#res.render - This still confuses me. As I start my server like so:
Code
app.get('/', function(req, res) { //Everything on URL / servers this
res.sendFile(path.join(__dirname + '/files/index.html'));
});
app.use(express.static(path.join(__dirname, 'public'))); //This serves all the css stuff under the public folder
server = app.listen(8080); //This is passed to the chatHow do I dynamically update something on a page from the Node server?
Oh and I do not want to use sockets for this.
https://www.npmjs.com/package/ejs doesn't uise the same syntax as {{ }}

