New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

enviro-conf

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enviro-conf

Simple node.js environment variable config loader inspired by The Twelve Factor App

  • 0.3.1
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Environment Configuration

A simple node.js environment variable config loader inspired by The Twelve Factor App

Build
Status Coverage Status npm version

Installation

$ npm install enviro-conf --save

Usage

Setup environment variables:

$ export PORT=3000 FEATURE=something

Accessing config properties:

var config = require('enviro-conf');
//...
var port = config.get('PORT');
server.listen(port, ...);

config.get() will throw an exception for undefined keys to help catch typos and missing values.

Check if config properties exist:

var config = require('enviro-conf');
//...
if (config.has('FEATURE')) {
  var detail = config.get('FEATURE');
  //...
}

Tests

$ npm test

Inspiration

Keywords

FAQs

Package last updated on 28 Jun 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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc