From 6ad10d7631a830d06dcbcace01a82fc0e87665bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Wed, 3 Nov 2021 15:33:36 -0300 Subject: [PATCH] documentation: Update README.md --- README.md | 14 +++++++++++--- package.json | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 215cc78..eac520d 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,18 @@ npm install @secjs/env ## Usage -> You can call the Env function to get an env variable +> You can use Env function as a global importing just one time the global file -```js -import Env from '@secjs/env' +```ts +import '@secjs/env/src/utils/global.ts' + +Env('DB_DATABASE', 'my-database') +``` + +> Or you can call directly the Env function + +```ts +import { Env } from '@secjs/env' // Simulating .env file DB_PORT=5432 diff --git a/package.json b/package.json index dd78d5c..f2ed5f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@secjs/env", - "version": "1.2.2", + "version": "1.2.3", "license": "MIT", "author": "João Lenon", "repository": "https://github.com/SecJS/Env.git",