0.1.0 • Published 3 years ago
@theriot.dev/env v0.1.0
@theriot.dev/env
This project provides an easy way to access environment variables within NodeJS
Installation
npm install @theriot.dev/envImport
import env from '@theriot.dev/env';Overview
First, define any project-specific constants inside of a .env file at the same level as your package.json. Then, you can access these and other environment variables using the get function:
.env:
SECRET=secretyour-file.ts:
let secret: string = env.get('SECRET');