K
K
koxac2020-02-14 09:13:11
JavaScript
koxac, 2020-02-14 09:13:11

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

2 answer(s)
M
McBernar, 2020-02-14
@koxac

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?

K
koxac, 2020-02-18
@koxac

Is there any way to run nodejs sites using ispmanager ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question