Skip to content
On this page

HTTP

Installation

bash
npm install @willsoto/node-konfig-http
bash
yarn add @willsoto/node-konfig-http
bash
pnpm add @willsoto/node-konfig-http

Usage

typescript
import * as Konfig from "@willsoto/node-konfig-core";
import { HttpLoader } from "@willsoto/node-konfig-http";

const loader = new HttpLoader({
  sources: [
    {
      url: "https://internal.config.com/config.json",
      parser: new Konfig.JSONParser(),
    },
  ],
});

Options

NameRequiredDescription
sourcesyesAn array of urls to load. See Source for more information.

Source

NameRequiredDescription
urlyesThe path to the secret in vault.
parseryesThe parser to use. See Parsers for more information.
fetchOptionsnoSee node-fetch