0.0.5 • Published 4 months ago

@glhrmoura/environment v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Environment

NPM Version License

An efficient Node library for managing and setting environment variables.

Install

$ yarn add @glhrmoura/environment

or

$ npm install @glhrmoura/environment

Usage

Basic

The library is quite simple to use, we just need to import and call a configuration function. The configuration will look for a .env file at the same level as the file calling it.

import { config } from '@glhrmoura/environment';

config();

Passing envPath property

The envPath property refers to the path of the .env file:

import { config } from '@glhrmoura/environment';

config({ envPath: '/path/envFile' });

Passing envPath as a list

The envPath property can also be in the form of a list, receiving multiple paths for different files:

import { config } from '@glhrmoura/environment';

config({ envPath: ['/path/envFileDev', '/path/envFileProd'] });

License

MIT

Copyright (c) Guilherme Moura

0.0.5

4 months ago

0.0.4

4 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago