Fix backend

This commit is contained in:
Anthony Wang 2021-05-06 21:18:44 -05:00
parent febafef425
commit 34e1da1787
Signed by: a
GPG key ID: 6FD3502572299774
2 changed files with 4 additions and 4 deletions

View file

@ -110,7 +110,7 @@ export default class Game {
}
while (this.lastPlayed > 0) { // Phase 2
await this.flip();
if (this.phase === 3) { // Oops, flipped over a red card!
if (this.phase === 3 as number) { // Oops, flipped over a red card!
await this.giveup(); // The player who called BS won and now the challenged player must give up a card!
return;
}

View file

@ -3,9 +3,9 @@ import http from 'http';
import https from 'https';
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),
"cert": fs.readFileSync(process.env.SSL_CERT),
"ca": fs.readFileSync(process.env.SSL_CA)
@ -14,4 +14,4 @@ base.listen(+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']}});