samedi 18 avril 2015

node js multer file upload not working when started with ubuntu upstart

I have a VPS(ubuntu 14.04) and I a nodejs app with multer for handler file upload and it works find when I when I start the server via node ex."node my-server.js"


but not if I start via upstart ex."sudo start node-app" node-app is a ubuntu upstart conf file here is the code


file: /etc/init/node-app.conf



description "node.js server"
author "Name"

start on (local-filesystems and net-device-up IFACE=wlan0)

stop on shutdown

# Automatically Respawn:
respawn
respawn limit 99 5

script
export HOME="/home/username/www/jlovesyou-server/"

exec node $HOME/bin/www 13002 >> /var/log/node.log 2>&1
end script


any idea why is not working via upstart?


Aucun commentaire:

Enregistrer un commentaire