diff --git a/client/index.html b/client/index.html index 5c11b2f6..8d1cbcc1 100644 --- a/client/index.html +++ b/client/index.html @@ -25,7 +25,7 @@ - +
diff --git a/client/js/socket.js b/client/js/socket.js index 278802d7..6f702fb1 100644 --- a/client/js/socket.js +++ b/client/js/socket.js @@ -5,6 +5,7 @@ const io = require("socket.io-client"); const path = window.location.pathname + "socket.io/"; const socket = io({ + transports: $(document.body).data("transports"), path: path, autoConnect: false, reconnection: false diff --git a/src/server.js b/src/server.js index 13406884..b609cfa2 100644 --- a/src/server.js +++ b/src/server.js @@ -32,7 +32,12 @@ module.exports = function() { .use(allRequests) .use(index) .use(express.static("client")) - .engine("html", expressHandlebars({extname: ".html"})) + .engine("html", expressHandlebars({ + extname: ".html", + helpers: { + tojson: c => JSON.stringify(c) + } + })) .set("view engine", "html") .set("views", path.join(__dirname, "..", "client"));