text: require("dotenv").config();
  var express = require("express");
  
  const cors = require('cors');
  const helmet = require('helmet');
  const morgan = require('morgan');
  
  var db = require("./models");
  
  var app = express();
  var PORT = process.env.PORT || 3000;
  
  // Middleware
  app.use(express.urlencoded({ extended: false }));
  app.use(express.json());
  
  app.use(helmet());
  
  require("./routes/apiRoutes")(app);
  
  var syncOptions = { force: false };
  
  // If running a test, set syncOptions.force to true
  // clearing the `testdb`
  if (process.env.NODE_ENV === "test") {
    syncOptions.force = true;
  }
  
  // Starting the server, syncing our models ------------------------------------/
  db.sequelize.sync(syncOptions).then(function() {
    app.listen(PORT, function() {
      console.log(
        "==> 🌎  Listening on port %s. Visit http://localhost:%s/ in your browser.",
        PORT,
        PORT
      );
    });
  });
  
  module.exports = app;
  