{"size": 661, "ext": "js", "max_stars_repo_path": "src/app.js", "max_stars_repo_name": "michaeltreyvaud/scrumdiddly-express", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/app.js", "max_issues_repo_name": "michaeltreyvaud/scrumdiddly-express", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/app.js", "max_forks_repo_name": "michaeltreyvaud/scrumdiddly-express", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.7931034483, "max_line_length": 52, "alphanum_fraction": 0.6959152799}
const express = require('express');
const Morgan = require('morgan');
const cookieParser = require('cookie-parser');
const bodyParser = require('body-parser');
const cors = require('cors');

const index = require('./routes/index');
const authRoute = require('./routes/auth');

const app = express();

app.use(Morgan('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(cors());

app.use('/', index);
app.use('/auth', authRoute);

// catch 404 and forward to error handler
const handle404 = function handle404(req, res) {
  res.sendStatus(404);
};

app.use(handle404);

module.exports = app;
