title: nodejs/ express sometimes not working
body: <p>I'm running nodejs &amp; express on a centos server. and I made the code below which worked fine when I made it... now its giving error ( I haven't even touch it).</p>
  
  <p>the strange thing is if I delete all the lines and add them again one by one it works again; but what I don't understand is that why it ever stops working ?</p>
  
  <p>My Code : </p>
  
  <p>App.js file:</p>
  
  <pre><code>var express = require('express'),
  mongo = require('mongodb').MongoClient,
  http = require('http'),
  path = require('path'),
  bodyParser = require('body-parser'),
  passport = require('passport-local'),
  config = require('./config/config.json');
  //CONNECT TO DATABASE - i removed the pass &amp; username when posting
  mongo.connect("mongodb://{username}:{pass}@ds037617.mongolab.com:37617/{db}", function (err, db) {
          if (err) {
          throw err;
          } else {
              console.log("successfully connected to the database");
          }
          db.close();
      });
      var publicUser = require('./routes/publicUser'),
      storeUser = require('./routes/publicUser'),
      adminUser = require('./routes/publicUser');
      app = express();
      app.set('views', path.join(__dirname, 'views'));
      app.set('view engine', 'jade');
      app.use('/', publicUser);
      app.use('/store', storeUser);
      app.use('/adminO', adminUser);
      //Load Statics
      app.use(express.static('public'));
      app.listen(80, function(){
      console.log('listening.........................................');
      });
  </code></pre>
  
  <p>terminal response/error: </p>
  
  <pre><code>30 Apr 18:23:00 - [nodemon] v1.3.7
  30 Apr 18:23:00 - [nodemon] to restart at any time, enter `rs`
  30 Apr 18:23:00 - [nodemon] watching: *.*
  30 Apr 18:23:00 - [nodemon] starting `node app.js`
  events.js:85
        throw er; // Unhandled 'error' event
              ^
  Error: listen EACCES
      at exports._errnoException (util.js:746:11)
      at Server._listen2 (net.js:1129:19)
      at listen (net.js:1172:10)
      at Server.listen (net.js:1257:5)
      at EventEmitter.app.listen (/home/ash/www/recruit/node_modules/express/lib/application.js:595:24)
      at Object.&lt;anonymous&gt; (/home/ash/www/recruit/app.js:28:6)
      at Module._compile (module.js:460:26)
      at Object.Module._extensions..js (module.js:478:10)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)
  30 Apr 18:23:01 - [nodemon] app crashed - waiting for file changes before starting...
  </code></pre>