{"size": 671, "ext": "js", "max_stars_repo_path": "server.js", "max_stars_repo_name": "m-hatch/express-mail-api", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "server.js", "max_issues_repo_name": "m-hatch/express-mail-api", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "server.js", "max_forks_repo_name": "m-hatch/express-mail-api", "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": 27.9583333333, "max_line_length": 53, "alphanum_fraction": 0.6989567809}
var express = require('express');
var mongoose   = require('mongoose');
var bodyParser = require('body-parser');
var router = require('./routes/router.js');
var mailRoute = require('./routes/mailRoute.js');
var compression = require('compression');
var helmet = require('helmet');

// initialize api and configure to get data from POST
var api = express();
api.use(bodyParser.urlencoded({ extended: true }));
api.use(bodyParser.json());
api.use(compression());
api.use(helmet());

var port = process.env.PORT || 3000; 

// register routes
api.use('/', router);
api.use('/mail', mailRoute);

// start server
api.listen(port);
console.log('server started on port ' + port);