souse

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i souse

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

97.6 kB

Total Files

5

Last publish

Collaborators

  • genediazjr