Friday, 14 December 2018

Are templating engines the only way to get data from node/express to the client?

I found this Stack Overflow question regarding how to send data to the client with express.js. The one answer there makes it sound like there is really no other way to get data from a database to the client without using a templating engine:You wouldn't be able to do it with a .html file. You'd need an EJS file...EJS is a templating language that converts to HTML, taking the data object you've passed in through your render method, rendering it server side, and then sending it to the browser.Is there no way to do this purely with express.js? I guess I don't mind using a templating engine, but I'd rather not add more technology if I can get away with it.EDIT: Found a better Stack Overflow answer that gives more options.

Submitted December 15, 2018 at 06:50AM by stoned_phillips

No comments:

Post a Comment