1.0.0 • Published 6 years ago
souse v1.0.0
souse
A hapi plugin that injects environment variables into hapi's server.app
.
The environment variables to be injected is expected to have a common name prefix
and their values must contain a stringified object containing a path
and a value
key.
FOO_VAR_test='{"path":"some.config.stuff","value":"Bazinga!"}' node app.js
Usage
server.register({
register: require('souse'),
options: {
prefix: 'FOO_VAR_'
}
}, (err) => {
...
});
Glue manifest
registrations: [
{
plugin: {
register: 'souse',
options: {
...
}
}
}
]
The order in which the plugin is called is important. The plugin will overwrite previous values of a key.
Contributing
- Include 100% test coverage
- Follow the Hapi coding conventions
- Submit an issue first for significant changes.