From 8c5a4a94a0c13abf61ac9dde78e520b569502644 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Thu, 8 Sep 2022 22:30:33 +0200 Subject: [PATCH] Removed the action socket from the backend -> Moving into another repo --- app.ts | 2 -- server/actionSocket.ts | 12 ------------ 2 files changed, 14 deletions(-) delete mode 100644 server/actionSocket.ts diff --git a/app.ts b/app.ts index 2f39aa4..8e92942 100644 --- a/app.ts +++ b/app.ts @@ -2,7 +2,6 @@ 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(); @@ -21,5 +20,4 @@ const start = () => { shortener.startServer(parseInt(process.env.SHORTENER_PORT || '')); if (!process.env.DISABLE_CONTENT_DELIVERY) contentDelivery.startServer(parseInt(process.env.CDN_PORT || '')); - actionSocket.startServer(parseInt(process.env.AS_PORT || '')); } \ No newline at end of file diff --git a/server/actionSocket.ts b/server/actionSocket.ts deleted file mode 100644 index 8e76646..0000000 --- a/server/actionSocket.ts +++ /dev/null @@ -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}`); -} \ No newline at end of file