Why use nginx for serving static (web) files in your docker file?

Hi, I have deployed apps to production in the past using this npm serve package. It's super easy, and pretty much for production, I just call npm run build to create the static file, and then call npx serve. But I'm learning about Docker now and it seems like it's standard practice to use nginx to serve the static file, even when dockerizing front-end node apps (in my case, Vue.js apps). Why is nginx better than using the simple npm serve package? And if that serve package is worse than using nginx, how does nginx compare to using an express server to serve the static files?

I am relatively new to full-stack web development, so if explanations could be relatively high level, I'd really appreciate it.

Thanks in advance.

submitted by /u/btbeats
[link] [comments]

from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/3bdllll

Leave a comment

Design a site like this with WordPress.com
Get started
search previous next tag category expand menu location phone mail time cart zoom edit close