express View engine setup

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


Often the server needs to serve pages dynamically.For an example an user Mr.X visits the page and sees some thing like "Welcome Mr. X to my homepage".In this case views can be helpful.Even to populate a table view can be handy. Variables can be injected into HTML dynamically using view engine.View engine is something that renders the views.One can keep views to be served in a folder called view and serve upon request .The path of the folder can be shown to Express using path.resolve method .


install ejs using the following(I know it's obvious)

sudo npm install ejs --save

Got any express Question?