Skip to content

Commit

Permalink
docs: simple npm install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Dec 20, 2022
1 parent f99b842 commit 9913354
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ automatically load dotenv files based on `NODE_ENV`
## Install

``` bash
npm install --only=production --save autoenv
npm install autoenv
```

## Config
Expand Down Expand Up @@ -47,20 +47,20 @@ require('autoenv')
When starting your application, ensure `NODE_ENV` is set to the environment name you wish to load.

``` bash
$ NODE_ENV=staging node index.js
NODE_ENV=staging node index.js
```

``` bash
$ export NODE_ENV=staging
$ node index.js
export NODE_ENV=staging
node index.js
```

### Preload

You can use the `--require` (`-r`) command line option to preload autoenv. By doing this, you do not need to `require` in your application code.

``` bash
$ node -r autoenv index.js
node -r autoenv index.js
```

That's it.
Expand Down
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Install

```bash
npm install --only=production --save autoenv
npm install autoenv
```

## Config
Expand Down Expand Up @@ -39,20 +39,20 @@ require('autoenv')
When starting your application, ensure `NODE_ENV` is set to the environment name you wish to load.

```bash
$ NODE_ENV=staging node index.js
NODE_ENV=staging node index.js
```

```bash
$ export NODE_ENV=staging
$ node index.js
export NODE_ENV=staging
node index.js
```

### Preload

You can use the `--require` (`-r`) command line option to preload autoenv. By doing this, you do not need to `require` in your application code.

```bash
$ node -r autoenv index.js
node -r autoenv index.js
```

That's it.
Expand Down

0 comments on commit 9913354

Please sign in to comment.