Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

hapi-conf

1.1.0 • Public • Published

hapi-conf

hapi-conf loads environment variables using dotenv and exposes with a hapi server method. Environment variables are filtered and parsed as JSON with filter-env.

Circle CI bitHound Overall Score bitHound Dependencies

Usage

The following example loads environment variables from .env and filters the variables

const fs = require('fs');
const Hapi = require('hapi');
const hapiConf = requre('hapi-conf');
const server = new Hapi.Server({});
hapiConf(server, /^TEST-/, { env: fs.readFileSync('./.env'), json: true, freeze: true });

install

npm i hapi-conf

Downloadsweekly downloads

4

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar