diff --git a/README.md b/README.md index 97d3298..47faa58 100644 --- a/README.md +++ b/README.md @@ -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