don't require banned numbers or mixpanel modules
This commit is contained in:
parent
e4385527b7
commit
a72cbb1b05
24
app.js
24
app.js
@ -7,8 +7,23 @@ var express = require('express')
|
|||||||
, spawn = require('child_process').spawn
|
, spawn = require('child_process').spawn
|
||||||
, Stream = require('stream')
|
, Stream = require('stream')
|
||||||
, providers = require('./providers.js')
|
, providers = require('./providers.js')
|
||||||
, banned_numbers = require('./banned_numbers.js')
|
, redis = require('redis-url').connect()
|
||||||
, mixpanel_config = require('./mixpanel_config.js')
|
|
||||||
|
// Optional modules
|
||||||
|
var banned_numbers;
|
||||||
|
try {
|
||||||
|
banned_numbers = require('./banned_numbers.js')
|
||||||
|
} catch(e) {
|
||||||
|
banned_numbers = {BLACKLIST: {}};
|
||||||
|
}
|
||||||
|
|
||||||
|
var mpq;
|
||||||
|
try {
|
||||||
|
mixpanel_config = require('./mixpanel_config.js')
|
||||||
|
mpq = new mixpanel.Client(mixpanel_config.api_key);
|
||||||
|
} catch(e) {
|
||||||
|
mpq = {track: function() {}};
|
||||||
|
}
|
||||||
|
|
||||||
var access_keys;
|
var access_keys;
|
||||||
try {
|
try {
|
||||||
@ -19,11 +34,6 @@ try {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
access_keys = {};
|
access_keys = {};
|
||||||
}
|
}
|
||||||
console.log('Loaded access keys:', access_keys);
|
|
||||||
|
|
||||||
var mpq = new mixpanel.Client(mixpanel_config.api_key);
|
|
||||||
|
|
||||||
var redis = require('redis-url').connect();
|
|
||||||
|
|
||||||
// Express config
|
// Express config
|
||||||
app.set('views', __dirname + '/views');
|
app.set('views', __dirname + '/views');
|
||||||
|
Loading…
Reference in New Issue
Block a user