Skip to content

Commit

Permalink
docs: fixing the library name and simplifying use example
Browse files Browse the repository at this point in the history
  • Loading branch information
ameliazz authored Apr 6, 2024
1 parent ce53cc2 commit f0bc6a3
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 align='center'>(🔺) Mozz.js</h1>
<h1 align='center'>(🔺) Mozz.Env</h1>
<p align='center'>Mozz is your Environment Enhancer</p>

## How to use
Expand All @@ -19,22 +19,7 @@ Let's set up two environments, one for development and one for production using
}
```

> In the Mozz profile you can set `@file` for every environment to change your `.env` file, for example:
```json
{
"production": {
"@file": ".env",
"hostname": "0.0.0.0"
},
"development": {
"@file": ".env.local",
"hostname": "localhost"
}
}
```

And we will also configure the `MOZZ_ENV` environment variable:
We will also configure the variable `MOZZ_ENV` in `.env` so the library knows which environment we are wanting:

```env
MOZZ_ENV="development"
Expand All @@ -43,7 +28,7 @@ MOZZ_ENV="development"
Now, we can move on to the code, just import `Mozz` and create a instance to access your environment settings

```js
const Mozz = require('mozz.js')
const Mozz = require('mozz.env')
const Enhancer = new Mozz()

Enhancer.env.hostname // localhost
Expand Down

0 comments on commit f0bc6a3

Please sign in to comment.