<commit_before># load-env

Load your environment configuration in a easy way and only one time.

<a href="https://nodei.co/npm/load-env/"><img src="https://nodei.co/npm/load-env.png?downloads=true"></a>

[![Build Status](https://travis-ci.org/joaquimserafim/load-env.png?branch=master)](https://travis-ci.org/joaquimserafim/load-env)



**V1**

####API

    var load = require('load-env') || require('load-env').load()
    
    load([environment], [config_path])
    
    
    or from CLI: node my_app --env heroku
    
    in your app: load();
    
    --env is mandatory in CLI 
   
   
   **config** folder must be in your application current directory or can use [path]
   to define the localization of your config files, and the files must have the exactly name as your environment (heroku.json will be env heroku).
   
   **Example:**
   
*    config / 
*        development.json
         heroku.json
         local.json    
    



####JSON

 {"config_name": {"name": "", "format": "", "value":""}}
 
*  name: var name
*  format: placeholders
*       %s - String
        %d - Number (both integer and float)
        %j - JSON
*  value: object with the values to replace the placeholders
    
   **Example**
    
        {
          "mongodb": {
            "name": "MONGODB_URL",<commit_msg>README bad markdown<commit_after># load-env

Load your environment configuration in a easy way and only one time.

<a href="https://nodei.co/npm/load-env/"><img src="https://nodei.co/npm/load-env.png?downloads=true"></a>

[![Build Status](https://travis-ci.org/joaquimserafim/load-env.png?branch=master)](https://travis-ci.org/joaquimserafim/load-env)



**V1**

####API

    var load = require('load-env') || require('load-env').load()
    
    load([environment], [config_path])
    
    
    or from CLI: node my_app --env heroku
    
    in your app: load();
    
    --env is mandatory in CLI 
   
   
   **config** folder must be in your application current directory or can use [path]
   to define the localization of your config files, and the files must have the exactly name as your environment (heroku.json will be env heroku).
   
   **Example:**
   
      config/ 
          development.json
          heroku.json
          local.json    
    



####JSON

 {"config_name": {"name": "", "format": "", "value":""}}
 
    name: var name
    format: placeholders
        %s - String
        %d - Number (both integer and float)
        %j - JSON
    value: object with the values to replace the placeholders
    
   **Example**
    
        {
          "mongodb": {
            "name": "MONGODB_URL",
{'fraction_non_alphanumeric': 0.13957055214723926, 'fraction_numerical': 0.0007668711656441718, 'mean_word_length': 2.42838370565046, 'pattern_counts': {'":': 12, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7401604', 'n_tokens_mistral': 841, 'n_tokens_neox': 812, 'n_words': 237}