skip to Main Content

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


  1. 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 like nodemon, but something needs to run the software using Node.js.

    Login or Signup to reply.
  2. You can use nohup command to run the command in the background.

    nohup node server
    

    If you want to access the server to kill the process:

    ps -aux
    

    The above command will list processes.

    kill -9 <PID>
    

    You can find more details in the link provided above.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search