New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@sk39/dotenv-ex

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

@sk39/dotenv-ex

Dotenv extension. Switch settings with NODE_ENV

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

dotenv-ex

Dotenv extension. Switch settings with NODE_ENV.

NPM

Install

npm install @sk39/dotenv-ex

Usage

As early as possible in your application, require and configure dotenv.

require('@sk39/dotenv-ex').config()

Create a .env file in the root directory of your project. Add environment-specific variables on new lines in the form of NAME=VALUE. For example:

DEBUG=true
SERVER_URL="http://127.0.0.1:3000/"
NUMBER_FLAG=0
FLOAT_FLAG=0.0034

further. You can overwrite the NODE_ENV specific settings by creating a .env.{NODE_ENV} file.

process.env now has the keys and values you defined in your .env file.

const env = require("dotenv-ex").config();
console.log(process.env.SERVER_URL)

Keywords

dotenv

FAQs

Package last updated on 01 Oct 2020

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