refactor of networking when first reaching game page

This commit is contained in:
AlecM33
2022-01-20 22:00:53 -05:00
parent d04a1d2b5e
commit fd3b05dd80
14 changed files with 308 additions and 307 deletions

View File

@@ -65,15 +65,11 @@ const ServerBootstrapper = {
let io;
if (process.env.NODE_ENV.trim() === 'development') {
io = require('socket.io')(main, {
cors: { origin: 'http://localhost:' + port },
pingTimeout: 5000,
pingInterval: 5000
cors: { origin: 'http://localhost:' + port }
});
} else {
io = require('socket.io')(main, {
cors: { origin: 'https://playwerewolf.uk.r.appspot.com' },
pingTimeout: 5000,
pingInterval: 5000
cors: { origin: 'https://playwerewolf.uk.r.appspot.com' }
});
}