Skip to content

Instantly share code, notes, and snippets.

@marttp
Created September 14, 2019 06:56
Show Gist options
  • Save marttp/a4d5b3bf02ef0a9ce39255495f9350d5 to your computer and use it in GitHub Desktop.
Save marttp/a4d5b3bf02ef0a9ce39255495f9350d5 to your computer and use it in GitHub Desktop.
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
const PORT = process.env.PORT || 3000;
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use('/api', require('./routes'));
app.listen(PORT, () => {
console.log(`Server listening on PORT: ${PORT}`);
});
module.exports = app;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment