WS_SECRET json accepts object

This commit is contained in:
cubedro 2015-08-19 21:20:02 +03:00
parent f4ac50612b
commit 1f5a8eebf8

5
app.js
View File

@ -20,11 +20,12 @@ if( !_.isUndefined(process.env.WS_SECRET) && !_.isNull(process.env.WS_SECRET) )
else else
{ {
try { try {
WS_SECRET = require('./ws_secret.json'); var tmp_secret_json = require('./ws_secret.json');
WS_SECRET = _.values(tmp_secret_json);
} }
catch (e) catch (e)
{ {
console.error("WS_SECRET NOT SET"); console.error("WS_SECRET NOT SET!!!");
} }
} }