Skip to content

Commit

Permalink
New readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Robsahm committed Dec 5, 2016
2 parents 4095ed2 + 074489a commit f622d7a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
## Setup
Initiate config fetching. `environment` is one of "dev", "stage" or "prod"
```
var refreshConfig = require("next-config-client");
refreshConfig({
var configClient = require("next-config-client");
configClient({
requestUrl: "ws://example.com/api/vx/config/",
environment: "dev"
})
.then((config) => {
// Do stuff with config and start app
});
```
After that use `configClient.config` to get the latest config

0 comments on commit f622d7a

Please sign in to comment.