title: Running node.js server with mongodb error
body: <p>I'm still new to node.js and mongodb. Now I'm trying to solve this problem.</p>
  
  <p>I have instructions to run my server without any problems, I follow them and yes my server works. But when I switched the server off then run it again I face this bug:</p>
  
  <pre>
  [vagrant@localhost ~]$ node /opt/inapsrv/app/app.js 
  app-api listening at http://0.0.0.0:7000
  
  /opt/inapsrv/node_modules/fileupload/lib/modules/file.js:23
    throw error
          ^
  Error: ENOENT, mkdir 'data/imagex/'
  </pre>
  
  <p>And here is the line of the directory above taken from app.js file:</p>
  
  <pre><code>var imagePath = 'data/imagex/';
  </code></pre>
  
  <p>I tried to:</p>
  
  <ul>
  <li>make vagrant and mongo users as super users and they have the root permissions.</li>
  <li>to run "sudo node /opt/inapsrv/app/app.js"</li>
  <li>run "forever /opt/inapsrv/app/app.js"</li>
  </ul>
  
  <p>and it didn't work.</p>
  
  <p>I don't know why it successfully ran the first time, and then it didn't!
  Any help?</p>