Use 'host' configuration for HTTP listening (both app and cluster)

This commit is contained in:
Sandro Santilli
2012-10-09 18:31:06 +02:00
parent bc51b14485
commit bb00bf1c05
4 changed files with 11 additions and 6 deletions
+4 -2
View File
@@ -33,5 +33,7 @@ var Windshaft = require('windshaft');
var serverOptions = require('./lib/cartodb/server_options');
ws = CartodbWindshaft(serverOptions);
ws.listen(global.environment.port);
console.log("Windshaft tileserver started on port " + global.environment.port);
ws.listen(global.environment.port, global.environment.host);
ws.on('listening', function() {
console.log("Windshaft tileserver started on " + global.environment.host + ':' + global.environment.port);
});
+5 -2
View File
@@ -41,12 +41,15 @@ var ws = CartodbWindshaft(serverOptions);
//.use(cluster.pidfiles('pids'))
var cluster = new Cluster({
port: global.environment.port,
host: global.environment.host,
monPort: global.environment.port+1,
noWorkers: 1 // .set('workers', 1)
monHost: global.environment.host,
noWorkers: 1
});
cluster.listen(function(cb) {
cb(ws);
}, function() {
console.log("Windshaft tileserver started on port " + global.environment.port);
});
console.log("Windshaft tileserver started on port " + global.environment.port);
+1 -1
View File
@@ -4,7 +4,7 @@
"dependencies": {
"cluster2": {
"version": "0.3.5-cdb01",
"from": "git://github.com/CartoDB/cluster2.git#28cde11",
"from": "git://github.com/CartoDB/cluster2.git#cdb_production",
"dependencies": {
"express": {
"version": "2.5.11",
+1 -1
View File
@@ -18,7 +18,7 @@
"email": "simon@vizzuality.com"
},
"dependencies": {
"cluster2": "git://github.com/CartoDB/cluster2.git#28cde11",
"cluster2": "git://github.com/CartoDB/cluster2.git#cdb_production",
"node-varnish": "0.1.1",
"underscore" : "~1.3.3",
"grainstore" : "~0.9.1",