Skip to content

Instantly share code, notes, and snippets.

@sharad-s
Created August 24, 2018 19:05
Show Gist options
  • Save sharad-s/93936967a4648737fea5ed83ec4788ce to your computer and use it in GitHub Desktop.
Save sharad-s/93936967a4648737fea5ed83ec4788ce to your computer and use it in GitHub Desktop.
// Direct Imports
const express = require("express");
const winston = require("winston");
// Instantiate express
const app = express();
require("./startup/logging")();
require("./startup/middleware")(app);
// require("./startup/config")();
require("./startup/routes")(app);
require("./startup/db")();
require("./startup/validation")();
// PORT
const port = process.env.PORT || 5000;
const server = app.listen(port, () => {
winston.info(`Listening on port ${port}...`);
});
module.exports = server;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment