Removed the action socket from the backend -> Moving into another repo
This commit is contained in:
parent
499a44cad7
commit
8c5a4a94a0
2
app.ts
2
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 || ''));
|
||||
}
|
@ -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}`);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user