app.js 334 Bytes
const express = require('express');
const bodyParser = require('body-parser')
const app = express();
const api = require('./routes/index');
require('dotenv').config();

app.use(bodyParser.json());
app.use('/api', api);

const port = process.env.PORT || 3001;
app.listen(port, () => console.log(`Listening on port ${port}`));