目前部署到Modulus的生产和开发应用程序需要部署到Galaxy,而CNAMES需要切换。 在不打扰现有用户的情况下执行此操作的正确步骤是什么? 与二进制NPM软件包SSL / CNAMES相关的步骤是什么?
答案 0 :(得分:2)
以下是我为部署到galaxy所做的工作。
var events = require('events');
var net = require('net');
var channel = new events.EventEmitter();
channel.clients = {};
channel.subscriptions = {};
channel.on('join', function (id, client) {
this.clients[id] = client;
this.subscriptions[id] = function (senderId, message) {
if (senderId !== id) {
this.clients[id].write(message);
}
};
this.on('broadcast', this.subscriptions[id]);
});
var server = net.createServer(function (client) {
var id = client.remoteAddress + ': ' + client.remotePort;
console.log('Server connected', id);
channel.emit('join', id, client);
client.on('data', function(data) {
data = data.toString();
channel.emit('broadcast', id, data);
});
});
server.listen(8888);
var Client = net.createConnection;
var client = Client({port: 8888, localAddress: '127.0.0.1', localPort: 51000});
client.on('connect', function() {
var id = this.localAddress + ': ' + this.localPort;
console.log('Client connected', id);
});
(Name: www, Type: CNAME, TTL: xhr, data: galaxy-ingress.meteor.com)
它必须是Ex domainname.com