1.0.0 • Published 5 years ago
shiftby-config v1.0.0
@shiftby/config
Can read options from ENV variables or files.
Example:
const requiredOptions = ['SECRET_KEY'];
// File path can be provided in SECRET_KEY_FILE env
// Will fallback to SECRET_KEY env if SECRET_KEY_FILE is not set
const options = new Options(requiredOptions);
await options.initialize();
const key = options.get('SECRET_KEY');
1.0.0
5 years ago