@cubetiq/vstore
v0.0.2
Published
A simple way to use environment variables in Node.js and other environments.
Downloads
54
Readme
vStore SDK for JS/TS
A simple way to use environment variables in Node.js and other environments.
- [x] Load all configs
- [x] Cache support
- [x] Namespace support
- [x] Load to
process.env
support
Usages
import { VStore } from '@cubetiq/vstore';
const PROJECT_ID = 'xx';
const API_KEY = 'vs_xx';
const sdk = VStore.createWith(PROJECT_ID, API_KEY);
sdk.config()
.waitForReady()
.then(() => {
console.log(sdk.config().isReady());
console.log(sdk.config().getByKey('app.name'));
console.log(sdk.config().get('common', 'app.name'));
})
.catch((err) => {
console.error(err);
});
Contributors
- Sambo Chea [email protected]