1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-11 05:40:11 +02:00
copilot/cloudapi-graphql/src/credentials.js
Sérgio Ramos 8e832f9f03 enable triton credentials from credentials.json
credentials can be set not only using ENV variables,
but also with credentials.json (if it is found)
2016-10-20 10:58:19 +01:00

15 lines
344 B
JavaScript

const json = (() => {
try {
return require('../credentials.json');
} catch (err) {
return {};
}
})();
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 || ''
};