server-to-server

Setup Server-Server SSL communication using socket.io in node.js

岁酱吖の 提交于 2019-11-27 04:27:03
问题 I'm trying to setup a server to server link using socket.io over ssl connection. This is my exmaple: /** * Server */ var app = require('express')(); var config = require('./config'); var https = require('https'); var http = require('http'); var fs = require('fs'); var server = https.createServer({key: fs.readFileSync(config.ssl.key), cert: fs.readFileSync(config.ssl.cert), passphrase: config.ssl.passphrase}, app); //var server = http.createServer(app); var io = require('socket.io').listen