title: Upstart node.js working directory
body: <p>Starting Node.js with Upstart, when trying to access files within Node.js it cannot access them without using the full path. I need it to use the working directory.</p>
  
  <pre><code>start on startup
  stop on shutdown
  
  script
          echo $$ &gt; /var/run/mynodeapp.pid
          exec sudo -u mynodeapp node server.js &gt;&gt; /var/log/mynodeapp.sys.log 2&gt;&amp;1
  end script
  
  pre-start script
          echo "Starting" &gt;&gt; /var/log/mynodeapp.sys.log
  end script
  
  pre-stop script
          rm /var/run/mynodeapp.pid
          echo "Stopping" &gt;&gt; /var/log/mynodeapp.sys.log
  end script
  </code></pre>