# vim: set ft=upstart:

# Upstart job configuration for Parsoid
# This file is managed by Puppet

description "Parsoid HTTP service"

start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]

setuid "www-data"
setgid "www-data"

env VCAP_APP_PORT="<%= @port %>"
env NODE_PATH="<%= @parsoid_path %>/node_modules"

chdir "<%= @dir %>"
exec node src/api/server.js

respawn

# vim: set ft=upstart:

# Upstart job configuration for Parsoid
# This file is managed by Puppet

description "Parsoid HTTP service"

start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]

setuid "www-data"
setgid "www-data"

env VCAP_APP_PORT="<%= @port %>"
env NODE_PATH="<%= @dir %>/node_modules"

chdir "<%= @dir %>"
exec node src/api/server.js

respawn

Set NODE_PATH correctly for parsoid
Set NODE_PATH correctly for parsoid

The upstart config stanza to set NODE_PATH was using the undefined
'parsoid_path' variable instead of the correct 'dir' variable.

Change-Id: If332232a5c75b5e6026244af3e22db3222ba78b0
