Added the shortener, cdn & action socket to the app.ts

This commit is contained in:
Mathias Wagner 2022-09-06 20:51:32 +02:00
parent 896b2a1aab
commit f2aa6ad49f
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

6
app.ts
View File

@ -1,5 +1,8 @@
import mongoose, {CallbackError} from 'mongoose';
import * as api from './server/api';
import * as shortener from './server/shortener';
import * as contentDelivery from './server/contentDelivery';
import * as actionSocket from './server/actionSocket';
// Load & check environment
require('dotenv').config();
@ -15,4 +18,7 @@ mongoose.connect(process.env.MONGOOSE_STRING || '', (e: CallbackError) => {
// Start all servers
const start = () => {
api.startServer(parseInt(process.env.API_PORT || ''));
shortener.startServer(parseInt(process.env.SHORTENER_PORT || ''));
contentDelivery.startServer(parseInt(process.env.CDN_PORT || ''));
actionSocket.startServer(parseInt(process.env.AS_PORT || ''));
}