text: var express = require('express'),
    app = express(),
    port = process.env.PORT || 3000,
    mongoose = require('mongoose'),
    Task = require('./api/models/tlModel'),
    bodyParser = require('body-parser');
  
  mongoose.Promise = global.Promise;
  mongoose.connect('mongodb:/localhost/Tododb');
  
  app.use(bodyParser.urlencoded({ extended: true }));
  app.use(bodyParser.json());
  
  var routes = require('.api/routes/tlRoutes');
  routes(app);
  
  app.listen(port);
  
  console.log('todo list REST API server started on: ' + port);