From 07693eeedd6a5dc4a5d33e2ccf7c4fff77f6a2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Sat, 22 Jan 2022 15:20:49 +0000 Subject: [PATCH] config.js.example -> config.json.example (ref. #31) --- config.js.example | 40 ---------------------------------------- config.json.example | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 40 deletions(-) delete mode 100644 config.js.example create mode 100644 config.json.example diff --git a/config.js.example b/config.js.example deleted file mode 100644 index f86daa6..0000000 --- a/config.js.example +++ /dev/null @@ -1,40 +0,0 @@ -/* - * LibResilient config - * - * This is an example config for LibResilient. When deploying LibResilient on your website - * you will need to create your own config, using this one as a template. - * - */ - -// plugins config -self.LibResilientConfig.plugins = [{ - name: 'fetch' - },{ - name: 'cache' - },{ - name: 'any-of', - uses: [{ - name: 'alt-fetch', - // configuring the alternate endpoints plugin to use IPNS gateways - // - // NOTICE: we cannot use CIDv0 with gateways that use hash directly in the (sub)domain: - // https://github.com/node-fetch/node-fetch/issues/260 - // we *can* use CIDv1 with such gateways, and that's suggested: - // https://docs.ipfs.io/how-to/address-ipfs-on-web/#path-gateway - // https://cid.ipfs.io/ - endpoints: [ - 'https://.ipns.dweb.link/', // USA - 'https://ipfs.kxv.io/ipns//', // Hong Kong - 'https://jorropo.net/ipns//', // France - 'https://gateway.pinata.cloud/ipns//', // Germany - 'https://.ipns.bluelight.link/' // Singapore - - ] - },{ - name: 'gun-ipfs', - gunPubkey: '' - }] - }] - -// we need to explicitly list components we want to see debug messages from -self.LibResilientConfig.loggedComponents = ['service-worker', 'fetch', 'cache', 'any-of', 'alt-fetch', 'gun-ipfs'] diff --git a/config.json.example b/config.json.example new file mode 100644 index 0000000..1899907 --- /dev/null +++ b/config.json.example @@ -0,0 +1,23 @@ +{ + "plugins": [{ + "name": "fetch" + },{ + "name": "cache" + },{ + "name": "any-of", + "uses": [{ + "name": "alt-fetch", + "endpoints": [ + "https://.ipns.dweb.link/", + "https://ipfs.kxv.io/ipns//", + "https://jorropo.net/ipns//", + "https://gateway.pinata.cloud/ipns//", + "https://.ipns.bluelight.link/" + ] + },{ + "name": "gun-ipfs", + "gunPubkey": "" + }] + }], + "loggedComponents": ["service-worker", "fetch", "cache", "any-of", "alt-fetch", "gun-ipfs"] +}