Skip to content

Instantly share code, notes, and snippets.

@jonataspinto
Created October 6, 2020 22:10
Show Gist options
  • Save jonataspinto/20dd3de97a3ddf82d8e4627dc9dd7146 to your computer and use it in GitHub Desktop.
Save jonataspinto/20dd3de97a3ddf82d8e4627dc9dd7146 to your computer and use it in GitHub Desktop.
const express = require('express');
const routes = require('./routes');
const app = express();
app.use(express.json())
.use(routes)
.get('*', (request, response) => {
response.json({message: "invalid route"})
})
module.exports = app;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment