Require carto_data only after setting the global env (closes #28)
This one is for "cluster.js", the previous was for app.js
This commit is contained in:
parent
d18cf96007
commit
c918b09e64
@ -19,7 +19,6 @@ if (ENV != 'development' && ENV != 'production'){
|
||||
|
||||
var _ = require('underscore')
|
||||
, Step = require('step')
|
||||
, cartoData = require('./lib/cartodb/carto_data')
|
||||
, CartodbWindshaft = require('./lib/cartodb/cartodb_windshaft');
|
||||
|
||||
|
||||
@ -28,6 +27,10 @@ global.settings = require(__dirname + '/config/settings');
|
||||
global.environment = require(__dirname + '/config/environments/' + ENV);
|
||||
_.extend(global.settings, global.environment);
|
||||
|
||||
// Include cart_data.js only _after_ the "global" variable is set
|
||||
// See https://github.com/Vizzuality/Windshaft-cartodb/issues/28
|
||||
var cartoData = require('./lib/cartodb/carto_data');
|
||||
|
||||
var Windshaft = require('windshaft');
|
||||
var serverOptions = require('./lib/cartodb/server_options');
|
||||
|
||||
@ -39,4 +42,4 @@ cluster(ws)
|
||||
.set('workers', 1)
|
||||
.listen(global.environment.port, global.environment.host);
|
||||
|
||||
console.log("Windshaft tileserver started on port " + global.environment.port);
|
||||
console.log("Windshaft tileserver started on port " + global.environment.port);
|
||||
|
Loading…
Reference in New Issue
Block a user