# upstart script for example server

description "Mailtrain server"
author "Andris Reinman <andris@kreata.ee>"

start on runlevel [2345]
stop on runlevel [!2345]

env NODE_ENV=production

respawn
respawn limit 10 0

script
    cd /opt/mailtrain
    exec node index.js >> /var/log/mailtrain.log 2>&1
end script
