init db and socket changes for prod

This commit is contained in:
ntr
2018-10-23 17:50:53 +11:00
parent f2c8213255
commit a3eab9dc79
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -3,6 +3,8 @@ const cbor = require('borc');
const actions = require('./actions');
const SOCKET_URL = process.env.NODE_ENV === 'production' ? 'ws://cryps.gg:40000' : 'ws://localhost:40000';
function errorToast(err) {
console.error(err);
return toast({
@@ -21,7 +23,7 @@ function createSocket(store) {
let gameStateTimeout;
function connect() {
ws = new WebSocket('ws://localhost:40000');
ws = new WebSocket(SOCKET_URL);
ws.binaryType = 'arraybuffer';
// Connection opened