text: var express = require('express'),
    app = express(),
    port = process.env.PORT || 3000,
    mongoose = require('mongoose'),
    Task = require('./api/models/todoListModel'), //created model loading here
    Produto = require('./api/models/produtoModel'), //created model loading here
    bodyParser = require('body-parser');
  
  // mongoose instance connection url connection
  mongoose.Promise = global.Promise;
  mongoose.connect('mongodb://localhost/', {
    useMongoClient: true
  });
  
  app.use(bodyParser.urlencoded({ extended: true }));
  app.use(bodyParser.json());
  
  var routes = require('./api/routes/todoListRoutes'); //importing route
  var routesProdutos = require('./api/routes/produtoRoutes'); //importing route
  var loginRoute = require('./api/routes/userRoutes'); //importing route
  routesProdutos(app);
  loginRoute(app);
  routes(app);
  
  app.use(function(req, res) {
    res.status(404).send({ url: req.originalUrl + ' not found' });
  });
  
  app.listen(port);
  
  console.log('todo list RESTful API server started on: ' + port);
  