Set socket.io port correctly

This commit is contained in:
Anthony Wang 2022-01-12 14:48:47 -06:00
parent 35726b7052
commit ab5dd5c12a
Signed by: a
GPG key ID: BC96B00AEC5F2D76

View file

@ -3,7 +3,7 @@ import http from 'http';
import https from 'https'; import https from 'https';
import {Server} from 'socket.io'; import {Server} from 'socket.io';
export default new Server({cors: {origin: process.env.ORIGIN, methods: ['GET', 'POST']}}); export default new Server(Number(process.env.PORT!), {cors: {origin: process.env.ORIGIN, methods: ['GET', 'POST']}});
/*const base = process.env.SSL_KEY && process.env.SSL_CERT && process.env.SSL_CA ? https.createServer({ /*const base = process.env.SSL_KEY && process.env.SSL_CERT && process.env.SSL_CA ? https.createServer({
"key": fs.readFileSync(process.env.SSL_KEY), "key": fs.readFileSync(process.env.SSL_KEY),