The cdn now only starts if the gbucket.json file has been provided

This commit is contained in:
Mathias Wagner 2022-09-08 22:21:51 +02:00
parent dfeb238469
commit b8c8fa700b
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

3
app.ts
View File

@ -19,6 +19,7 @@ mongoose.connect(process.env.MONGOOSE_STRING || '', (e: CallbackError) => {
const start = () => {
api.startServer(parseInt(process.env.API_PORT || ''));
shortener.startServer(parseInt(process.env.SHORTENER_PORT || ''));
contentDelivery.startServer(parseInt(process.env.CDN_PORT || ''));
if (!process.env.DISABLE_CONTENT_DELIVERY)
contentDelivery.startServer(parseInt(process.env.CDN_PORT || ''));
actionSocket.startServer(parseInt(process.env.AS_PORT || ''));
}