clinical:env

v4.0.0Published 7 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

clinical:env

As of v1.3.x, Meteor has begun supporting twelve-factor app app architecture, by way of providing an ismorphic process.env.NODE_ENV variable on both server and client. As such, the clinical:env package has effectively been incorporated into the core product, and we've begun drastically reducing this package.

If there is demand to bring back the .env file, we might bring that back in. But there have been some

Circle CI

========================================

Installation

meteor add clinical:env

========================================

Usage

The client API is now simply isomorphic syntactic sugar for the process.env.NODE_ENV environment variable.

1  if(Env.isProduction){
2    console.log("The NODE_ENV variable is set to 'prod'.");
3  }
4  if(Env.isDevelopment){
5    console.log("The NODE_ENV variable is set to 'dev'.");
6  }
7  if(Env.isTesting){
8    console.log("The NODE_ENV variable is set to 'testing'.");
9  }
10  if(Env.isTraining){
11    console.log("The NODE_ENV variable is set to 'training'.");
12  }
13  if(Env.isStaging){
14    console.log("The NODE_ENV variable is set to 'staging'.");
15  }

========================================

.env File

If you were using .env file to store environment variables, we recommend adding the dotenv NPM package to your package.json file.

https://www.npmjs.com/package/dotenv

========================================

Licensing

MIT License