Last active
July 29, 2018 19:57
-
-
Save collins-b/1230ee517142db3f34947ec3cee344ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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