Skip to content

Commit

Permalink
Added dotenv section in configuration article
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Aug 20, 2020
1 parent 4b06672 commit 3ed7080
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/v3/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,21 @@ const osjs = new Core(config, {
omit: ['ws.port']
});
```

## Dotenv

You can provide configuration via a dotenv (`.env`) file to make make it dynamic.

This applies to both the client and the server

```
OSJS_STANDALONE=true
```

And in your `src/client/config.js` file:

```javascript
{
standalone: process.env.OSJS_STANDALONE === 'true'
}
```

0 comments on commit 3ed7080

Please sign in to comment.