- Also did some refactoring for cleaner code Co-authored-by: Patrick Müller <patrick@mueller-patrick.tech> Reviewed-on: #2 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 #2.
This commit is contained in:
@@ -12,11 +12,10 @@ if (!process.env.PORT) {
|
||||
|
||||
const port: number = parseInt(process.env.PORT, 10);
|
||||
|
||||
// DHBW Service
|
||||
import {generalInfoRouter} from "./src/models/dhbw-service/GeneralInfo.router";
|
||||
|
||||
// Twitch Highlight Marker
|
||||
import {addHighlightRouter} from "./src/models/twitch-highlight-marker/AddHighlight.router";
|
||||
// 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);
|
||||
@@ -25,8 +24,9 @@ const server: http.Server = http.createServer(app);
|
||||
app.use(bodyparser.json());
|
||||
|
||||
// Add routers
|
||||
app.use('/dhbw-service/generalInfo', generalInfoRouter);
|
||||
app.use('/twitch-highlight-marker/addHighlight', addHighlightRouter);
|
||||
app.use('/dhbw-service', dhbwServiceRouter);
|
||||
app.use('/twitch-highlight-marker', highlightMarkerRouter);
|
||||
app.use('/partyplaner', partyPlanerRouter);
|
||||
|
||||
// this is a simple route to make sure everything is working properly
|
||||
app.get('/', (req: express.Request, res: express.Response) => {
|
||||
|
||||
Reference in New Issue
Block a user