Skip to content

homoky/process-env-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

process-env-checker

Check if all requested environment variables are present.

Usage

  1. Create file env.d.ts with (you can call it like you want) with this template:
/// <reference types="node" />

declare namespace NodeJS {
  interface ProcessEnv {
    readonly STRIPE_API_KEY: string;
    // ADD ANOTHER ENVs
  }
}
  1. Install this package locally in devDependencies like yarn add process-env-checker

  2. Run manually or add to package.json script. Do not forget to provide path to definition file: yarn process-env-checker check ./env.d.ts

Note: Do not forget to pass envs as part of script, otherwise it fails. Example: MY_ENV_TEST=hello yarn process-env-checker check ./env.d.ts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published