0.0.1 • Published 6 years ago

meri-dotenv v0.0.1

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

meri-dotenv

Loads environment variables from .env file and casts a real type of values, not just strings.

SETUP

Install dependencies

npm install meri-dotenv
yarn add meri-dotenv

Create .env file in your root directory project

# COMMENT
STRING_VALUE=awesome
BOOL_TRUE_VALUE=true
BOOL_FALSE_VALUE=false
INTEGER_VALUE=3
FLOAT_VALUE=3.1416

Using

// const config = require('meri-dotenv')
import config from 'meri-dotenv'

console.log(config)

or

// const { STRING_VALUE } = require('meri-dotenv')
import { STRING_VALUE } from 'meri-dotenv'

console.log(STRING_VALUE)