JSPM

symfony-dotenv

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 204
  • Score
    100M100P100Q83864F
  • License MIT

Loads environment variables from .env file as Symfony

Package Exports

  • symfony-dotenv

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (symfony-dotenv) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

symfony-dotenv

Build Status Code Coverage

Package load all .env files as Symfony

In all environments, the following files are loaded if they exist, the latter taking precedence over the former:

  • .env contains default values for the environment variables needed by the app
  • .env.local uncommitted file with local overrides
  • .env.$APP_ENV committed environment-specific defaults
  • .env.$APP_ENV.local uncommitted environment-specific overrides

symfony doc

Install

# with npm 
npm install symfony-dotenv
 
# or with Yarn 
yarn add symfony-dotenv

Example

# simple
let envFactory = require('symfony-dotenv');
let config = envFactory(__dirname + '.env');