0.1.3 • Published 7 years ago

env-import v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

env-import

Configure environment variables with dotenv in one absolute import using ES6 import syntax.

I made this because ESLint was complaining about my enviroment variables configuration file relative import being before the absolute imports

// import dotenv in env.js file and run dotenv.config() there
import './env';
// other absolute imports

or any code being before imports

import dotenv from 'dotenv';
dotenv.config();
// other absolute imports

and some of dependecies rely on environment variables being configured to function properly (like api-error-handler in here)

Usage

// With .env in your root directory

import 'env-import'

// Now all environment variables are configured
0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago