Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Javascript 

How do I dynamically update my page?

I have seen this alot:

Code
<b>Name: </b>{{=it.something.created}} <i>{{=it.game.lads}}</i>

OR

Code
res.render

https://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 chat

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 {{ }}


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Javascript]  by bevcMay 10, 2020 06:31 AM 0 76 May 10, 2020 06:31 AM
Last Post: bevc
[Javascript]  by NightRider12Mar 14, 2019 07:57 AM 0 144 Mar 14, 2019 07:57 AM
Last Post: NightRider12
[Javascript]  by WilkyfreeflowFeb 9, 2019 05:01 AM 1 182 Feb 9, 2019 05:01 AM
Last Post: Lynx