R
R
Roman Andreevich2019-02-19 12:17:49
JavaScript
Roman Andreevich, 2019-02-19 12:17:49

How to start pm2 on computer startup?

Colleagues, good day,
Tell me who was puzzled by this topic. When you start the computer, you need to run pm2 and pm2-web automatically. How to implement it???? Whatever the handles (
Thanks in advance

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Anton, 2016-08-31
@Ooos

stackoverflow.com/questions/23764863/how-to-close-...

V
Vitaliy Orlov, 2019-02-19
@RomanDillerNsk

PM2 - Restart Processes After System Reboot
and execute as root, what will display, example:

sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup upstart -u vagrant --hp /home/vagrant

A
Artem, 2019-02-19
@ulkoart

You can use systemd
to create a file /etc/systemd/system/node_api
containing approximately

[Unit]
Description=API
After=network.target

[Service]
User=username
Environment=HOST=localhost
WorkingDirectory=/app
ExecStart=/usr/bin/node index.js

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
systemctl enable node_api
systemctl start node_api

P
Pavel, 2019-02-19
@mrusklon

https://remontka.pro/autorun-windows-10/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question