- Also various other improvements Co-authored-by: Patrick Müller <patrick@mueller-patrick.tech> Reviewed-on: #3 Co-authored-by: Patrick Müller <patrick@plutodev.de> Co-committed-by: Patrick Müller <patrick@plutodev.de>
This commit was merged in pull request #3.
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import express from 'express';
|
||||
import * as http from 'http';
|
||||
import * as bodyparser from 'body-parser';
|
||||
import * as dotenv from 'dotenv';
|
||||
// Router imports
|
||||
import {partyPlanerRouter} from './src/models/partyplaner/PartyPlaner.router';
|
||||
import {highlightMarkerRouter} from './src/models/twitch-highlight-marker/HighlightMarker.router';
|
||||
import {dhbwServiceRouter} from './src/models/dhbw-service/DHBWService.router';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
@@ -12,16 +15,11 @@ if (!process.env.PORT) {
|
||||
|
||||
const port: number = parseInt(process.env.PORT, 10);
|
||||
|
||||
// Router imports
|
||||
import {partyPlanerRouter} from "./src/models/partyplaner/PartyPlaner.router";
|
||||
import {highlightMarkerRouter} from "./src/models/twitch-highlight-marker/HighlightMarker.router";
|
||||
import { dhbwServiceRouter } from './src/models/dhbw-service/DHBWServiceRouter';
|
||||
|
||||
const app: express.Application = express();
|
||||
const server: http.Server = http.createServer(app);
|
||||
|
||||
// here we are adding middleware to parse all incoming requests as JSON
|
||||
app.use(bodyparser.json());
|
||||
app.use(express.json());
|
||||
|
||||
// Add routers
|
||||
app.use('/dhbw-service', dhbwServiceRouter);
|
||||
|
||||
Reference in New Issue
Block a user