Skip to content

Commit

Permalink
documentation: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Nov 3, 2021
1 parent 645a925 commit 6ad10d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 6ad10d7

Please sign in to comment.