From 3d1756ca2da20d70e30f60c2a127991a280c6985 Mon Sep 17 00:00:00 2001 From: tmyngu11 Date: Sat, 7 Aug 2021 19:37:07 -0400 Subject: [PATCH 1/2] updated readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index f8ed8fa..79f2f96 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,10 @@ const client = new HyperionStreamClient(ENDPOINT, {async: false}); Example: ```javascript const client = new HyperionStreamClient('https://example.com', {async: false}); + +// NodeJS +const fetch = require("node-fetch"); +const client = new HyperionStreamClient('https://example.com', {async: false, fetch: fetch}); ``` `https://example.com` is the host, from where `https://example.com/v2/history/...` is served. From c6cd3e538f16d02ff4654840ceed92c4fab35997 Mon Sep 17 00:00:00 2001 From: tmyngu11 Date: Sat, 7 Aug 2021 19:50:59 -0400 Subject: [PATCH 2/2] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 79f2f96..d1a5779 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,9 @@ For other usages the bundle is also available at `dist/bundle.js` Setup the endpoint that you want to fetch data from and the flow control mode: ```javascript -const client = new HyperionStreamClient(ENDPOINT, {async: false}); +const client = new HyperionStreamClient(ENDPOINT, HYPERION_CLIENT_OPTIONS); ``` +**HYPERION_CLIENT_OPTIONS** can be found in `src/interfaces.ts` Example: ```javascript