Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@capsulajs/capsulajs-configuration-service

Package Overview
Dependencies
Maintainers
5
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capsulajs/capsulajs-configuration-service

Capsula-JS Configuration Service

latest
npmnpm
Version
0.1.17
Version published
Maintainers
5
Created
Source

Configuration Service

Providers

localFile

Configuration will be included in a local json file.

Example token: "./path/to/configuration"

httpFile

Configuration will be included in a json file on some external http/https host and will be served statically.

Example token: "http://localhost:1234"

scalecube

Configuration will be available as an entry point of a special Scalecube server.

httpServer

Configuration will be available as an entry point of some http/https server.

Example token: "http://localhost:1234"

localStorage

Configuration will be available under a special key in localStorage.

Example token: "configurationKey"

GetProvider util

Is used to get the class of an appropriate ConfigurationProvider.

Will throw an error, if wrong configProvider is provided in the call of the function.

Possible values for configProvider:

  • "localFile"
  • "httpFile"
  • "scalecube"
  • "httpServer"
  • "localStorage"

Example

try {
  const HttpFileConfigurationProvider = getProvider({ configProvider: "localFile" as LocalFileConfigurationProvider });
  const configurationService = new HttpFileConfigurationProvider("http://localhost:1234");
} catch(error) {
  console.log('error.message');
}

FAQs

Package last updated on 16 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts