@capsulajs/capsulahub-service-configuration
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Configuration service extension for CapsulaHub

Service that you can use for managing different configurations across your projects. Configuration service gives you possibility to easily manage your configurations.

Install

NPM

To install the package from NPM registry you should run

yarn add @capsulajs/capsulahub-service-configuration

or

npm install @capsulajs/capsulahub-service-configuration

CDN

You can get the default export from the link

https://capsulajs.s3.amazonaws.com/develop/capsulahub-service-configuration/index.js

API

ConfigurationService API in src of ConfigurationService

Usage

Part of configuration

{
  "services": [
    {
      "serviceName": "ConfigurationService",
      "path": "https://capsulajs.s3.amazonaws.com/develop/capsulahub-service-configuration/index.js",
      "definition": {
        "serviceName": "ConfigurationService",
        "methods": {
          "createRepository": { "asyncModel": "requestResponse" },
          "delete": { "asyncModel": "requestResponse" },
          "entries": { "asyncModel": "requestResponse" },
          "fetch": { "asyncModel": "requestResponse" },
          "save": { "asyncModel": "requestResponse" }
        }
      },
      "config": {
        "provider": "http"
      }
    }
  ]
};

Options

Use different configuration providers to manage your configurations over remote service, localStorage, file, etc. For RemoteProvider you should probide dispatcher as well.

Possible providers More:

  • RemoteProvider
  • LocalStorageProvider
  • FileProvider
  • HttpProvider

Default provider:

  • FileProvider

Use different transport providers to setup communication over http or web sockets.

Possible dispatchers More:

  • AxiosDispatcher
  • WebSocketDispatcher

Licence

CapsulaHub and related services are released under MIT Licence.

Back to the Main Page

Versions

Current Tags

Version History

Package Sidebar

Install

npm i @capsulajs/capsulahub-service-configuration

Weekly Downloads

4

Version

0.0.3

License

MIT

Unpacked Size

383 kB

Total Files

36

Last publish

Collaborators

  • 95kach
  • capsulajsbot
  • capsulajsci
  • idanilt
  • mikesquall