I am wondering how people work with Nodejs and nginx.
It seems that nginx is used as a web server serving static files (css, js, ¿static html?) In front of the Nodejs server. Developers, following this approach, say that nginx has demonstrated very fast completion of this task.
My doubt is this: speaking only about html files, why is this approach better than using Nodejs with templates (e.g. written in descriptors) compiled and available in memory? Intuitively, not so much faster than accessing the disk to get static html? Or maybe nginx also supports html in memory? Should I stop the caching attempt in expressjs in favor of nginx?
I'm just trying to build things right from the start.
Many thanks.
source
share