Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dotenv-vars

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotenv-vars

The slimmest module to load a .env file in your project path, setting each row in environment variables.

  • 1.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
53
increased by1225%
Maintainers
1
Weekly downloads
 
Created
Source

dotenv-vars

The slimmest module to load a .env file in your project path, setting each row in environment variables.

Installation

npm install --save dotenv-vars

Usage

  • Put a .env file in your project root containing one pair of environment variable on each row like NODE_ENV=debug
  • In the top of your main file put require('dotenv-vars')

Example

Supports both [Segment titles] as well as # comments

.env

[Environment]
NODE_ENV=debug
PORT=3000

[Amazon]
# AWS_ACCESS_KEY_ID=
# AWS_SECRET_ACCESS_KEY=
# AWS_SESSION_TOKEN=

index.js

require('dotenv-vars');

console.log('process.env.PORT');

Prints: 3000

Keywords

FAQs

Package last updated on 15 Jul 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