text: //var createError = require('http-errors');
  const bodyParser = require('body-parser');
  var express = require('express');
  //var cookieParser = require('cookie-parser');
  //var logger = require('morgan');
  var cors = require('cors')
  var app = express();
  app.use(bodyParser.json());
  app.use(bodyParser.urlencoded({extended: false}));
  
  //app.use(logger('dev'));
  //app.use(express.json());
  //app.use(express.urlencoded({ extended: false }));
  //app.use(cookieParser());
  app.use(cors())
  //Application Gateways
  app.use('/product', require('./API_Gateways/Product'));
  app.use('/unittype', require('./API_Gateways/UnitType'));
  app.use('/producttype', require('./API_Gateways/ProductType'));
  app.use('/customer', require('./API_Gateways/Customer'));
  app.use('/city', require('./API_Gateways/City'));
  app.use('/sale', require('./API_Gateways/Sale'));
  app.use('/order', require('./API_Gateways/Order'));
  app.use('/orderitem', require('./API_Gateways/OrderItem'));
  
  // catch 404 and forward to error handler
  app.use(function(req, res, next) {
    next(createError(404));
  });
  
  // error handler
  app.use(function(err, req, res, next) {
    // set locals, only providing error in development
    res.locals.message = err.message;
    res.locals.error = req.app.get('env') === 'development' ? err : {};
  
    // render the error page
    res.status(err.status || 500);
  
  });
  
  module.exports = app;
  