0.1.1 • Published 3 years ago

@amgsus/hub v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Key-value exchange & RPC server (aka Mediator)

Run standalone

For Node.js 14 and higher:

node ./app/service.mjs

For older Node.js versions a key --experimental-modules must be added. However, it is not guaranteed that the application will run in older environment properly.

Command line arguments

KeyAliasMandatoryDescriptionExample
--config <file>-cNoLoad configuration from file (JSON)-c config.json
--port <n>-pNoSpecify network port server listens on-p 7778
--local-NoForce bind server to local host--local
--mirror <ip>[:<port>]-mNoMirror remote instance-m 192.168.0.50:7778
--preload <file>-dNoPreload dictionary with key-values from file (JSON or plain text)-d values.json
--http [<ip>[:<port>]]-hNoEnable REST API server on specified IP-address and port. Default: 0.0.0.0:7780-h 0.0.0.0:7780
--debug-NoEnable debug output--debug
--verbose-NoEnable detailed output--debug
--no-console-NoSuppress any output to console--no-console
--help-NoPrint help (no run)--help

Configuration

Example of configuration file (*.json):

{
    "network": {
        "interface": "*",
        "port": 7778
    }
}

Example of pre-loadable key-value file (*.json):

{
    "KeyA": "ValueA",
    "KeyB": "ValueB",
    "KeyC": "ValueC"
}

Example of pre-loadable key-value file (*.txt):

KeyA=ValueA
KeyB=ValueB
KeyC=ValueC
0.1.1

3 years ago