1.3.6 • Published 1 month ago

hypercore-rehost-server v1.3.6

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 month ago

Hypercore Rehost Server

Simple server to keep hypercores available.

A CLI to interact with this server is provided at hypercore-rehost-cli.

Install

npm -g i hypercore-rehost-server

Usage

Note: can be run as Docker, see here.

CLI usage:

rehost-server

By default, the logs are in JSON format. If you wish them to be human-readable, pipe them into pino-pretty (which needs to be installed):

rehost-server | pino-pretty

Endpoints

See also example.js for examples of how to call the server's endpoints.

GET /

List all entries directly contained in the rehoster.

Entries are of the from {key, info?}.

PUT /<public-key>

Add the core with the specified public key (in hex) to the rehoster.

Also accepts optional JSON data of form { info: <str> }

DELETE /<public-key>

Delete the core with the specified public key (in hex) from the rehoster

GET /info

Returns a JSON with keys info and details, and string values.

Info contains a summary of the total nr of hosted keys (including recursively hosted ones).

Details contains basic info for all hosted keys (including recursively hosted ones).

Config

Config variables are specified either in a .env file or as environment variables. They include:

  • CORESTORE_LOC = './rehoster-corestore'
    • The location of the corestore where all cores will be stored
  • BEE_NAME = 'rehoster-bee'
    • The name of the hyperbee containing the public keys of all hypercores to be rehosted
  • LOG_LEVEL = 'info'
  • HOST = '127.0.0.1'
    • Address where the server runs
  • PORT
    • Port where the server runs
1.3.6

1 month ago

1.3.5

2 months ago

1.3.4

3 months ago

1.3.3

4 months ago

1.3.2

4 months ago

1.3.1

4 months ago

1.3.0

5 months ago

1.2.0

5 months ago

1.1.0

5 months ago

1.0.0

8 months ago

0.13.12

9 months ago

0.13.11

9 months ago

0.13.10

9 months ago

0.13.6

11 months ago

0.13.7

9 months ago

0.13.8

9 months ago

0.13.9

9 months ago

0.11.0

12 months ago

0.10.1

12 months ago

0.12.0

12 months ago

0.13.0

11 months ago

0.12.1

12 months ago

0.13.1

11 months ago

0.13.2

11 months ago

0.13.3

11 months ago

0.13.4

11 months ago

0.13.5

11 months ago

0.10.0

12 months ago

0.9.0

1 year ago

0.8.1

1 year ago

0.8.0

1 year ago

0.7.1

1 year ago

0.5.4

1 year ago

0.5.3

1 year ago

0.5.5

1 year ago

0.5.0

1 year ago

0.7.0

1 year ago

0.5.2

1 year ago

0.6.0

1 year ago

0.5.1

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago