2016-10-20 04:13:04 +03:00
|
|
|
const json = (() => {
|
|
|
|
try {
|
2016-11-01 18:14:55 +02:00
|
|
|
require('dotenv').config({
|
2016-11-02 18:13:15 +02:00
|
|
|
path: '../.env',
|
|
|
|
silent: true
|
2016-11-01 18:14:55 +02:00
|
|
|
});
|
2016-11-02 18:13:15 +02:00
|
|
|
} catch (err) {
|
|
|
|
try {
|
|
|
|
return require('../credentials.json');
|
|
|
|
} catch (err) {
|
|
|
|
return {};
|
|
|
|
}
|
2016-10-20 04:13:04 +03:00
|
|
|
}
|
2016-11-02 18:13:15 +02:00
|
|
|
return {};
|
2016-10-20 04:13:04 +03:00
|
|
|
})();
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
url: process.env.SDC_URL || json.url || '',
|
|
|
|
account: process.env.SDC_ACCOUNT || json.account || '',
|
|
|
|
user: process.env.SDC_USER || json.user || '',
|
|
|
|
keyId: process.env.SDC_KEY_ID || json.keyId || ''
|
|
|
|
};
|