Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to load data dynamically into a html div from a mongoDb server using node.js

Before you downvote me to oblivion please read the rest of the details:
I would like to load data dynamically to html elements using data from mongoDb, I am running node.js on the backed, and would like to know the best practices when it comes to load the data, are there any premade-workflows that will help me do that, and how to ensure the secure delivery of the data.

I currently have static elements that are not changing and would like to fill them out using live data from the server.
I am not looking for code, but instead I want to know if there are any libraries dedicated to doing that, or if there are any workflows which can guide me to proper testing and deployment

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

For render you dynamic data into html in node JS, you have to use template engine library.
This is best and easy to implement solution in my eye.

Engines are :

1.EJS : Link EJS

2.Express-handlebars : Link express-handlebars

3.Pug : Link pug

There are more available what ever you want you can use.

Here are some link that help you :

How To use EJS : EJS Use

EJS Official : EJS

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading