Os : CentOS Linux release 7.7.1908 (Core)
Node Version : v12.11.1
Npm Version : 6.11.3
Hey guys
I have Apache and Nodejs on same server , i installed WikiJs on my server and its ok , its running on port 8000 .
For running apache and nodejs together i flow this answer and its running perfectly .
But the problem is its need the node server
command always running on the server.
what i have to do , that its no need to run the node server
command but its work on my domain?
thanks.
2
Answers
You can’t run a program that depends on Node.js without running Node.js.
You can do that directly, you can write a startup script (e.g. with
@reboot
in cron or as an/etc/init.d/
script) to do it for you, you can do it via a tool likenodemon
, but something needs to run the software using Node.js.You can use
nohup
command to run the command in the background.If you want to access the server to kill the process:
The above command will list processes.
You can find more details in the link provided above.