mirror of
https://github.com/KevinMidboe/leifsbackend.git
synced 2026-02-06 00:17:42 +00:00
Working backend setup with endpoints and database setup for adventures.
This commit is contained in:
16
src/app.js
Normal file
16
src/app.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const express = require('express')
|
||||
const logger = require('morgan')
|
||||
const bodyParser = require('body-parser')
|
||||
|
||||
const app = express();
|
||||
app.use(logger('dev'));
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded({ extended: false }));
|
||||
|
||||
require('./routes')(app);
|
||||
|
||||
app.get('*', (req, res) => res.status(200).send({
|
||||
message: 'Welcome to the beginning of nothingness',
|
||||
}));
|
||||
|
||||
module.exports = app;
|
||||
Reference in New Issue
Block a user