{"size": 447, "ext": "js", "max_stars_repo_path": "nodejs/src/server.js", "max_stars_repo_name": "thinkclean/devspace2017", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "nodejs/src/server.js", "max_issues_repo_name": "thinkclean/devspace2017", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "nodejs/src/server.js", "max_forks_repo_name": "thinkclean/devspace2017", "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": 23.5263157895, "max_line_length": 72, "alphanum_fraction": 0.6666666667}
const express = require('express');
const bodyParser = require('body-parser');

const health = require('./api/health');
const todo = require('./api/todo');

const app = express();

app.use(bodyParser.json());

app.use('/_health', health(new express.Router()));
app.use('/api', todo(new express.Router()));

app.use((err, req, res, next) => { // eslint-disable-line no-unused-vars
  res.status(500).send(err.toString());
});

module.exports = app;
