old_contents: // Load the http module to create an http server.
  var http = require('http');
   
  // Configure our HTTP server to respond with Hello World to all requests.
  var server = http.createServer(function (request, response) {
    response.writeHead(200, {"Content-Type": "text/plain"});
    response.end("Hello World\n");
  });
   
  // Listen on port 8000, IP defaults to 127.0.0.1
  server.listen(8000);
   
  // Put a friendly message on the terminal
  console.log("Server running at http://127.0.0.1:8000/");
  
new_contents:     // set up ========================
      var express = require('express');
      var app = express();                              // create our app w/ express
      var mongoose = require('mongoose');               // mongoose for mongodb
      var morgan = require('morgan');                   // log requests to the console (express4)
      var bodyParser = require('body-parser');          // pull information from HTML POST (express4)
      var methodOverride = require('method-override');  // simulate DELETE and PUT (express4)
  
      // configuration =================
      mongoose.connect('mongodb://localhost/test');     // connect to mongoDB database
  
      // define model =================
      var DeezerAccount = mongoose.model('DeezerAccount', {
          accessToken: String,
          expire: String,
          userID: String
      });
  
      app.use(express.static(__dirname + '/public'));                 // set the static files location /public/img will be /img for users
      app.use(morgan('dev'));                                         // log every request to the console
      app.use(bodyParser.urlencoded({'extended':'true'}));            // parse application/x-www-form-urlencoded
      app.use(bodyParser.json());                                     // parse application/json
      app.use(bodyParser.json({ type: 'application/vnd.api+json' })); // parse application/vnd.api+json as json
      app.use(methodOverride());
  
      // routes ---------------------------------------------------------------------
      // get all stored accounts
      app.get('/api/accounts', function(req, res) {
  
          // use mongoose to get all accounts in the database
          DeezerAccount.find(function(err, accounts) {
  
              // if there is an error retrieving, send the error. nothing after res.send(err) will execute
              if (err)
                  res.send(err)
  
              res.json(accounts); // return all accounts in JSON format
          });
      });
  
      // application -------------------------------------------------------------
      app.get('*', function(req, res) {
          res.sendfile('./public/index.html'); // load the single view file (angular will handle the page changes on the front-end)
      });
  
      // listen (start app with node server.js) ======================================
      app.listen(8000);
      console.log("Deezer.Kids listening on port 8000");
  
subject: Update server.js