Restrict listening host to configured `node_host
`
This commit is contained in:
parent
9090a191a8
commit
aa350768ef
5
app.js
5
app.js
@ -26,5 +26,6 @@ _.extend(global.settings, env);
|
|||||||
|
|
||||||
// kick off controller
|
// kick off controller
|
||||||
var app = require(global.settings.app_root + '/app/controllers/app');
|
var app = require(global.settings.app_root + '/app/controllers/app');
|
||||||
app.listen(global.settings.node_port);
|
app.listen(global.settings.node_port, global.settings.node_host, function() {
|
||||||
console.log("CartoDB SQL API listening on port " + global.settings.node_port);
|
console.log("CartoDB SQL API listening on " + global.settings.node_host + ":" + global.settings.node_port);
|
||||||
|
});
|
||||||
|
@ -30,11 +30,13 @@ var app = require(global.settings.app_root + '/app/controllers/app');
|
|||||||
|
|
||||||
var cluster = new Cluster({
|
var cluster = new Cluster({
|
||||||
port: global.settings.node_port,
|
port: global.settings.node_port,
|
||||||
|
host: global.settings.node_host,
|
||||||
|
monHost: global.settings.node_host,
|
||||||
monPort: global.settings.node_port+1
|
monPort: global.settings.node_port+1
|
||||||
});
|
});
|
||||||
|
|
||||||
cluster.listen(function(cb) {
|
cluster.listen(function(cb) {
|
||||||
cb(app);
|
cb(app);
|
||||||
|
}, function() {
|
||||||
|
console.log("CartoDB SQL API listening on " + global.settings.node_host + ':' + global.settings.node_port);
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("CartoDB SQL API listening on port " + global.settings.node_port);
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
module.exports.node_port = 8080;
|
module.exports.node_port = 8080;
|
||||||
|
module.exports.node_host = '127.0.0.1';
|
||||||
module.exports.environment = 'development';
|
module.exports.environment = 'development';
|
||||||
module.exports.db_base_name = 'cartodb_dev_user_<%= user_id %>_db';
|
module.exports.db_base_name = 'cartodb_dev_user_<%= user_id %>_db';
|
||||||
module.exports.db_user = 'development_cartodb_user_<%= user_id %>';
|
module.exports.db_user = 'development_cartodb_user_<%= user_id %>';
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
"email": "simon@vizzuality.com, strk@vizzuality.com"
|
"email": "simon@vizzuality.com, strk@vizzuality.com"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cluster2": "git://github.com/CartoDB/cluster2.git#28cde11",
|
"cluster2": "git://github.com/CartoDB/cluster2.git#cdb_production",
|
||||||
"express": "~2.5.11",
|
"express": "~2.5.11",
|
||||||
"underscore" : "1.1.x",
|
"underscore" : "1.1.x",
|
||||||
"underscore.string": "1.1.5",
|
"underscore.string": "1.1.5",
|
||||||
|
Loading…
Reference in New Issue
Block a user