Skip to content

Instantly share code, notes, and snippets.

@collins-b
Last active July 29, 2018 19:57
Show Gist options
  • Save collins-b/1230ee517142db3f34947ec3cee344ff to your computer and use it in GitHub Desktop.
Save collins-b/1230ee517142db3f34947ec3cee344ff to your computer and use it in GitHub Desktop.
const express = require('express');
const logger = require('morgan');
const bodyParser = require('body-parser');
const cookieParser = require('cookie-parser');
const session = require('express-session');
const jwt = require('jsonwebtoken');
process.env.SECRET_KEY = 'example';
const app = express();
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser('example'));
app.use(session());
require('./routes')(app);
app.get('*', (req, res) => res.status(200).send({
message: 'A Mocha testing app.',
}));
module.exports = app;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment