Removed the action socket from the backend -> Moving into another repo

This commit is contained in:
Mathias Wagner 2022-09-08 22:30:33 +02:00
parent 499a44cad7
commit 8c5a4a94a0
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44
2 changed files with 0 additions and 14 deletions

2
app.ts
View File

@ -2,7 +2,6 @@ import mongoose, {CallbackError} from 'mongoose';
import * as api from './server/api'; import * as api from './server/api';
import * as shortener from './server/shortener'; import * as shortener from './server/shortener';
import * as contentDelivery from './server/contentDelivery'; import * as contentDelivery from './server/contentDelivery';
import * as actionSocket from './server/actionSocket';
// Load & check environment // Load & check environment
require('dotenv').config(); require('dotenv').config();
@ -21,5 +20,4 @@ const start = () => {
shortener.startServer(parseInt(process.env.SHORTENER_PORT || '')); shortener.startServer(parseInt(process.env.SHORTENER_PORT || ''));
if (!process.env.DISABLE_CONTENT_DELIVERY) if (!process.env.DISABLE_CONTENT_DELIVERY)
contentDelivery.startServer(parseInt(process.env.CDN_PORT || '')); contentDelivery.startServer(parseInt(process.env.CDN_PORT || ''));
actionSocket.startServer(parseInt(process.env.AS_PORT || ''));
} }

View File

@ -1,12 +0,0 @@
import {WebSocketServer} from 'ws';
let server: WebSocketServer;
/** Logs something with a socket prefix */
const log = (msg: string) => console.log(`[ActionSocket] ${msg}`);
/** Starts the socket server */
export const startServer = (port: number = 8674) => {
server = new WebSocketServer({port});
log(`Listening on port ${port}`);
}