API-13: Adding PartyPlaner main endpoint (#2)
Jenkins Production Deployment

- 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:
2021-08-18 12:02:59 +00:00
parent 5ef4fdb4e2
commit 7df8b5ad8e
8 changed files with 100 additions and 8 deletions
+7 -7
View File
@@ -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) => {