Skip to content

compendia/concierge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Concierge is an API to manage your Compendia Layer 2 Database. It acts as an OrbitDB node and CRUD API.

When you first run Concierge after configuring your env file, you'll get the multihash address (i.e. /orbitdb/foo/bar) that you can register in Compendia from the Tools section in the testnet web wallet.

Click here for a full guide on Compendia Databases.

API

All API requests require the configured API secret (as set in the .env file) in its URL query (e.g. http://localhost?secret=my_api_secret).

The following HTTP requests can be made to the API:

  • GET: Return an entry by ID. Requires id in url query.
  • POST: Create a new entry (entry must be stringified JSON object & pass the database's schema validation).
  • DELETE: Deletes an entry by ID. Requires id in url query.

Installation

  1. Register a database in your Compendia Wallet (Tools tab).

  2. Git clone this repository into your relay node and open it:

git clone https://github.com/compendia/concierge.git && cd concierge
  1. Copy .env.example to .env:
cp .env.example .env
  1. Edit your .env file. Set up the port, the database schema, and your validator passphrase:
nano .env
  1. Install dependencies:
sudo apt install build-essential
npm install -g node-gyp
npm install
npm install --save blockstore-core@1.0.2
  1. Start the server with pm2 so it stays online consistently (change name to something recognizable):
npm install -g pm2
pm2 start index.js --name concierge

If you want to set up a Concierge API for another database on the same server, simply clone the repository into a new directory and make sure to use a different port and pm2 process name.

About

For curators. Exposes an API that lets you write data to your Compendia database.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors