mirror of
https://github.com/yldio/copilot.git
synced 2024-12-01 07:30:07 +02:00
8295bd6882
this shall be a progressive process
28 lines
614 B
JavaScript
28 lines
614 B
JavaScript
const json = (() => {
|
|
try {
|
|
const res = require('dotenv').config({
|
|
path: '../.env',
|
|
silent: true
|
|
});
|
|
|
|
if (res.error) {
|
|
throw res.error;
|
|
}
|
|
} catch (err) {
|
|
try {
|
|
return require('../credentials.json');
|
|
} catch (err) {
|
|
return {};
|
|
}
|
|
}
|
|
|
|
return {};
|
|
})();
|
|
|
|
module.exports = {
|
|
url: process.env.SDC_URL || json.SDC_URL || json.url || '',
|
|
account: process.env.SDC_ACCOUNT || json.SDC_ACCOUNT || json.account || '',
|
|
user: process.env.SDC_USER || json.SDC_USER || json.user || '',
|
|
keyId: process.env.SDC_KEY_ID || json.SDC_KEY_ID || json.keyId || ''
|
|
};
|