diff --git a/test.js b/test.js index 67c48c6..01c56bf 100644 --- a/test.js +++ b/test.js @@ -69,7 +69,26 @@ if (global.window) { server.listen(port); } // game server - var gameServer = new require('http').createServer(); + var getArg = function (key) { + var value = ''; + process.argv.slice(2).forEach(function (arg) { + if (arg.indexOf(key + '=') === 0) { + value = arg.replace(key + '=', ''); + } + }); + return value; + }; + var gameServer + if (getArg('key')) { + var fs = require('fs'); + gameServer = require('https').createServer({ + key: fs.readFileSync(getArg('key')), + cert: fs.readFileSync(getArg('cert')), + ca: fs.readFileSync(getArg('ca')), + }); + } else { + gameServer = require('http').createServer(); + } io = require('socket.io')(gameServer,{ pingTimeout: 30000, maxHttpBufferSize: 1024*1024, diff --git a/webxoss-client b/webxoss-client index b69cfab..4b1c84b 160000 --- a/webxoss-client +++ b/webxoss-client @@ -1 +1 @@ -Subproject commit b69cfabd41cbea0059b03891f0a4c900fe2dbb09 +Subproject commit 4b1c84b47a1bc3efac902b792fb46b4e95151b4a