From 4c2da5afa2ee708ac870c2e2a8a6e45a0b519089 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Sat, 2 Jan 2021 09:29:06 +0000 Subject: [PATCH] Add KEYWORD env var This lets you change the default `node-red` keyword to filter new packages on --- README.md | 1 + index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b0c9f04..99bf37f 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ The container takes the following Environment variables: - PORT - Which port to listen on (defaults to `3000`) - 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 `registry:4873`) + - KEYWORD - The npm keyword to filter on (defaults to `node-red`) It presents 2 HTTP endpoints diff --git a/index.js b/index.js index cc4b6af..ddd7327 100644 --- a/index.js +++ b/index.js @@ -9,7 +9,7 @@ const superagent = require('superagent') const port = (process.env.PORT || 80) const listenHost = (process.env.HOST || '0.0.0.0') const registryHost = (process.env.REGISTRY || 'registry:4873') -const keyword = "node-red" +const keyword = (process.env.KEYWORD || "node-red") const url = "http://" + registryHost + "/-/all"