Open mikedevita opened 7 years ago
to temporarily work around this i have created a dead simple shell script called server.sh
with execute perms in /opt/conf/www/img.domain/com/server.sh
#!/bin/bash
cd /opt/conf/www/img.domain.com/server;
node server.js
i then run it via pm2
pm2 start --name img.domain.com /opt/conf/www/img.domain.com/server.sh
I use this for an internal imgur type mirror for our enterprise and it works great, however typically we use pm2 to manage the start/stop of nodejs scripts.
something like
pm2 start --name img.domain.com /opt/conf/www/img.domain.com/server/server.js
is what we try to achieve however i noticed that relative/local paths for the configs are being used, specifically noticed this at server/server.js:220. I changed this to be something like.and i use full paths from root for the server.conf for the
i
andclient
directories yet i get file not found when i try to refresh a page after uploading an image.Is there something else im missing to get this to work without cd'ing into
server/
and runningnode server.js &