1.0.0 • Published 6 years ago

souse v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

souse

Build Status Coverage Status Code Climate NPM Version NPM Downloads Dependency Status Known Vulnerabilities NSP Status

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