forked from postlight/parser-api
-
Notifications
You must be signed in to change notification settings - Fork 38
/
index.js
22 lines (16 loc) · 558 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const express = require('express');
const helmet = require('helmet');
const bodyParser = require('body-parser');
const morgan = require('morgan');
const config = require('./config');
const routes = require('./routes');
const app = express();
app.use(helmet());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json({ extended: true }));
app.use(morgan('tiny'));
app.use('/', routes);
app.listen(config.server.port, () => {
console.log(`🚀Mercury Parser API listens on port ${config.server.port}`);
});
module.exports = app;