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')
|
var _ = require('underscore')
|
||||||
, Step = require('step')
|
, Step = require('step')
|
||||||
, cartoData = require('./lib/cartodb/carto_data')
|
|
||||||
, CartodbWindshaft = require('./lib/cartodb/cartodb_windshaft');
|
, CartodbWindshaft = require('./lib/cartodb/cartodb_windshaft');
|
||||||
|
|
||||||
|
|
||||||
@ -28,6 +27,10 @@ global.settings = require(__dirname + '/config/settings');
|
|||||||
global.environment = require(__dirname + '/config/environments/' + ENV);
|
global.environment = require(__dirname + '/config/environments/' + ENV);
|
||||||
_.extend(global.settings, global.environment);
|
_.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 Windshaft = require('windshaft');
|
||||||
var serverOptions = require('./lib/cartodb/server_options');
|
var serverOptions = require('./lib/cartodb/server_options');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user