Create NodeJS configuration script (#2)
This commit is contained in:
12
api.setup
Executable file
12
api.setup
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
apt install nodejs npm
|
||||
mkdir -p /var/log/consult
|
||||
chgrp www-data /var/log/consult
|
||||
|
||||
npm list -g | grep pm2 || npm install -g pm2
|
||||
pm2 stop api/srv.consult.js
|
||||
pm2 delete api/srv.consult.js
|
||||
pm2 start api/srv.consult.js
|
||||
pm2 startup
|
||||
pm2 save
|
||||
Reference in New Issue
Block a user