Socket
Socket
Sign inDemoInstall

hapi-conf

Package Overview
Dependencies
3
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hapi-conf

Load and expose environment variables in hapi


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Install size
1.40 MB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 29 Feb 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc