0.0.29 • Published 5 years ago

@rapido/env v0.0.29

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

@rapido/env

This package includes modules to manage environment variables in Rapido apps.

Please refer to the Rapido documentation:

Installation

yarn add @rapido/env

Getting Started

// First initialize the env (e.g. during build process)
import initEnv from '@rapido/env/init';

// First initialize
initEnv({ NODE_ENV: 'development' });
// Later in code you can access env vars after the package has been initialized
import getEnv from '@rapido/env';

console.log(getEnv('NODE_ENV'));

API

initEnv(envars: { [key: string]: string }): void

Accepts an object of environment values and stores them for later.

import initEnv from '@rapido/env/init';

initEnv({ NODE_ENV: 'development' });

getEnv(key: string): string

Accepts a key string and returns the env variable value for that key.

import getEnv from '@rapido/env';

console.log(getEnv('NODE_ENV'));
0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago