|
|
|
@ -7,14 +7,14 @@ import {ConnectionManager} from "./manager"; |
|
|
|
|
import https = require('https'); |
|
|
|
|
import {Server} from 'socket.io'; |
|
|
|
|
import fs = require('fs'); |
|
|
|
|
import ini = require('ini'); |
|
|
|
|
|
|
|
|
|
export function GameServer(){ |
|
|
|
|
const p2p = require('socket.io-p2p-server').Server; |
|
|
|
|
|
|
|
|
|
let rootDir = __dirname + '/..'; |
|
|
|
|
|
|
|
|
|
let httpsPort = ini.parse(fs.readFileSync(rootDir + '/env_config.ini', 'utf-8'))['nodejs_port']; |
|
|
|
|
require("dotenv").config(); |
|
|
|
|
const httpsPort = process.env["https_port"]; |
|
|
|
|
|
|
|
|
|
let cert = fs.readFileSync(rootDir + '/ssl_certificate/cert.pem'); |
|
|
|
|
let key = fs.readFileSync(rootDir + '/ssl_certificate/key.pem'); |
|
|
|
|