Nodejs+nginx serving static files VS compiled templates

aldohaney

New Member
I am curious about the way people work with Nodejs and nginx.It seems very common to use nginx as a webserver serving static files (css, js, ?static html?) in front of a Nodejs server. The developers following this approach say that nginx has demonstrated to be really fast doing that task. My doubt is the following: speaking of html files only, why is this approach better than using Nodejs with the templates (written in handlebars, for example) compiled and available in memory? Intuitively, isn't that faster than accessing disk to get a static html? Or maybe nginx maintains the html in memory too? Should I stop the caching effort in expressjs in favour of nginx?I am just trying to build things properly from the beginning.Thank you very much.
 
Back
Top