Skip to content

Commit b9872a5

Browse files
committed
Updated readme examples
And library update
1 parent a0fdc8d commit b9872a5

File tree

5 files changed

+45
-41
lines changed

5 files changed

+45
-41
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,14 @@ Any HTTP server can be used to host those documents. This can also be done using
439439

440440
### Local Node-RED hosting
441441

442-
The same Node-RED instance can be used to host the various lists and custom schemas.
442+
The same Node-RED instance can be used to host the various lists and custom schemas, which are then accessible via `http://localhost:1880/*`
443443

444444
Here is an example of full Node-RED flow: [Node-RED_example_of_HTTP_flow.json](examples/Node-RED_example_of_HTTP_flow.json)
445445

446446
![Node-RED flow](examples/Node-RED_example_of_HTTP_flow.png)
447447

448+
In this example, the schemas are published at `http://localhost:1880/schemas/example.json` where `example.json` is the filename.
449+
448450
Read more on the [Node-RED cookbook](https://cookbook.nodered.org/http/serve-json-content).
449451

450452

@@ -456,7 +458,9 @@ Read more on the [Node-RED cookbook](https://cookbook.nodered.org/http/serve-jso
456458
## Caching of schemas
457459

458460
A disk copy of the downloaded JSON and JSONata documents is kept in cache on disk.
461+
There is a distinct disk cache copy for each node instance.
462+
459463
By default, the cache path is `/tmp/` but that can be changed with the environment variable `SCHEMAS_CACHE_PATH`
460464
Cached files have a `schema.[URL hash].[Node ID].tmp.js` format.
461465

462-
If schemas are updated without changing their URL, it is possible to either purge the local cache manually, or add a version number at the end of their URL, such as `https://example.net/a-schema.json?v2`
466+
If schemas are updated without changing their URL, it is possible to either alter the URL slightly (like `https://example.net/a-schema.json?v2`), delete and recreate the node (so that the node gets a new ID), or purge the local disk cache manually (in which case it is necessary to restart Node-RED to clear the memory cache).

0 commit comments

Comments
 (0)