Answer the question
In order to leave comments, you need to log in
How to properly deploy nodejs applications?
do you need to build a webpack bundle, for example, or fill in all the unassembled and do npm install on the server?
Answer the question
In order to leave comments, you need to log in
It all depends on the goals and scope. Imagine if you have a bundle >5Mb after compression.
At the same time, not all customers have their own server, even vps. Therefore, only a bundle is possible.
But I still prefer deploying to the server and procuring through nginx
It is correct to compile not on the server (but on the CI / CD worker, although in a small project of one person and on a local machine it will do). Test this collected and then copy to the server.
Reasons 2:
1. We are testing exactly what will work in production.
2. No need to install compilers, etc. to the server.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question