Remove HTTPS for now

This commit is contained in:
Anthony Wang 2021-05-06 08:28:36 -05:00
parent 10ba8f8ecd
commit 4837d25e8b
Signed by: a
GPG key ID: 6FD3502572299774

View file

@ -3,9 +3,9 @@ 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({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),
"cert": fs.readFileSync(process.env.SSL_CERT), "cert": fs.readFileSync(process.env.SSL_CERT),
"ca": fs.readFileSync(process.env.SSL_CA) "ca": fs.readFileSync(process.env.SSL_CA)
@ -14,4 +14,4 @@ base.listen(+process.env.PORT!, () => {
console.log(`Listening on port ${process.env.PORT}`); console.log(`Listening on port ${process.env.PORT}`);
}); });
export default new Server(base, {cors: {origin: process.env.ORIGIN, methods: ['GET', 'POST']}}); export default new Server(base, {cors: {origin: process.env.ORIGIN, methods: ['GET', 'POST']}});*