Answer the question
In order to leave comments, you need to log in
How to run sites on nodejs?
Good afternoon.
Now several php sites are running on the server, and everything is configured in this way,
there are several directories
/var/www/site1/
/var/www/site2/
/var/www/site3/
and nginx is configured so that each directory has its own domain, well and 1 nginx and php service started.
I want to learn nodejs and abandon php
But I don’t understand how to host nodejs sites, for each site run a web server on separate ports and proxy them through nginx or 1 server.js to all sites and nginx will not be needed at all, or what is the best way to do it?
Do you need express (or some other), or is it better to write with pens using http.createServer ?
Answer the question
In order to leave comments, you need to log in
Yes, run a node for each project and breed through nginx.
pm2 to help you get started and logs.
Better framework. Why do what has already been done?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question