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