0.0.29 • Published 4 years ago

@rapido/env v0.0.29

Weekly downloads
-
License
MIT
Repository
github
Last release
4 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

4 years ago

0.0.28

4 years ago

0.0.27

4 years ago

0.0.26

4 years ago

0.0.25

4 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago