Create NodeJS configuration script (#2)

This commit is contained in:
2025-08-22 21:02:44 +02:00
parent 204c6dc7c8
commit 31f8e9a8ae
6 changed files with 177 additions and 0 deletions

12
api.setup Executable file
View 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