From 074489a0328490bd9de47db72635ead9015fab13 Mon Sep 17 00:00:00 2001 From: Alex Robsahm Date: Thu, 1 Dec 2016 14:27:53 +0100 Subject: [PATCH] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8372647..1635375 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ Create the following enviroment variables Initiate config fetching. `environment` is one of "dev", "stage" or "prod" ``` -var refreshConfig = require("next-config-client"); -refreshConfig(enviroment); +var configClient = require("next-config-client"); +configClient.initializeConfigUpdate(enviroment) +.then((config) => { + // Do stuff with config and start app +}); ``` +Later use `configClient.getConfig()` to get the latest config