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.
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.
-
Register a database in your Compendia Wallet (Tools tab).
-
Git clone this repository into your relay node and open it:
git clone https://github.com/compendia/concierge.git && cd concierge
- Copy
.env.example
to.env
:
cp .env.example .env
- Edit your
.env
file. Set up the port, the database schema, and your validator passphrase:
nano .env
- Install dependencies:
sudo apt install build-essential
npm install -g node-gyp
npm install
npm install --save [email protected]
- 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.