Add frontend to be served by backend.

This commit is contained in:
2020-12-28 15:19:09 +01:00
parent 94226c140e
commit 391be9b833
18 changed files with 4905 additions and 8 deletions

16
backend/src/js/app.js Normal file
View File

@@ -0,0 +1,16 @@
const express = require('express');
const bodyParser = require('body-parser');
const applicationController = require('./controller/applicationCtrl');
const userController = require('./controller/userCtrl');
const port = 3000;
const app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.use(express.static('backend/public'));
app.use('/apps', applicationController);
app.use('/users', userController);
app.listen(port, () => console.log('Mock is listening at port ', port, '\n'));