3.0.6 • Published 5 years ago

the-env v3.0.6

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

the-env

Build Status npm Version JS Standard

Env resolver for the-framework

Installation

$ npm install the-env --save

Usage

Create a directory with name "env" and put env setting files like "database.json" there.

env/database.json

{
  "default": {
    "HOST": "localhost",
    "SHCEMA": "myapp",
    "USER": "myapp-db-user",
    "PASSWORD": "password-of-#{USER}"
  },
  "production": {
    "HOST": "http://myapp-db.com",
    "USER": "myapp-db-user-production",
    "PASSWORD": "a;skdjfasdwer"
  },
  "development": {
    "USER": "myapp-db-user-dev",
    "PASSWORD": "myapp-db-user-dev"
  }
}

env/index.js

'use strict'

const theEnv = require('the-env')

const env = theEnv({
  database: require('./database')
}).forEnv()

module.exports = env

API Guide

License

This software is released under the MIT License.

Links

3.0.6

5 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago