https://github.com/allanoricil/node-red-private-catalogue-builder
Simple service to create a custom catalogue from a Verdaccio instance
https://github.com/allanoricil/node-red-private-catalogue-builder
node-red verdaccio
Last synced: 3 months ago
JSON representation
Simple service to create a custom catalogue from a Verdaccio instance
- Host: GitHub
- URL: https://github.com/allanoricil/node-red-private-catalogue-builder
- Owner: AllanOricil
- License: apache-2.0
- Created: 2023-10-05T00:26:28.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-05T00:40:12.000Z (about 2 years ago)
- Last Synced: 2025-03-04T03:43:38.994Z (8 months ago)
- Topics: node-red, verdaccio
- Language: JavaScript
- Homepage:
- Size: 91.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-red-private-catalogue-builder
A minimal web app to host a `catalogue.json` file for a private repository of
Node-RED nodes.## Configure
Environment variables:
- NAME - catalogue name (defaults to `verdaccio`)
- PORT - which port to listen on (defaults to `8080`)
- HOST - which local IP Address to bind to (defaults to `0.0.0.0`)
- REGISTRY - a host and optional port number to connect to the NPM registry (defaults to `http://localhost:4873`)
- KEYWORD - the npm keyword to filter on (defaults to `node-red`)It exposes 3 endpoints:
````bash
GET /health used to check the status of the service
POST /update rebuilds the catalogue
GET /catalogue.json returns the current catalogue
````The `GET /update` route is called by [Verdaccio every time it changes something](https://verdaccio.org/docs/configuration#notifications):
````yaml
notify:
method: POST
headers: [{'Content-Type': 'application/json'}]
endpoint: http://catalogue/update
content: '{"name": "{{name}}", "versions": "{{versions}}", "dist-tags": "{{dist-tags}}"}'
````## Build
```bash
docker build . -t catalogue --no-cache
```
## Run```bash
docker run -dit --network=host -e NAME="MY CATALOG" -e REGISTRY="http://localhost:4873" catalogue
```