🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

hapi-conf

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-conf

Load and expose environment variables in hapi

1.1.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

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 });

Keywords

hapi

FAQs

Package last updated on 29 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts