text: 'use strict'
  
  var express = require('express');
  var bodyParser = require('body-parser');
  
  var app = express();
  
  //Cors
  app.use((req, res, next) => {
      res.header('Access-Control-Allow-Origin', '*');
      res.header('Access-Control-Allow-Headers', 'Authorization, X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Allow-Request-Method');
      res.header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, DELETE');
      res.header('Allow', 'GET, POST, OPTIONS, PUT, DELETE');
      next();
  });
  
  //Cargar Rutas
  var userRoutes = require('./routes/user');
  var followRoutes = require('./routes/follow');
  var publicationRoutes = require('./routes/publication');
  var messageRoutes = require('./routes/message');
  
  //Middlewares
  app.use(bodyParser.urlencoded({extended:false}));
  app.use(bodyParser.json());
  
  //Rutas
  app.use('/api', userRoutes);
  app.use('/api', followRoutes);
  app.use('/api', publicationRoutes);
  app.use('/api', messageRoutes);
  
  //Exportar
  module.exports = app;