Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.27 KB

README.md

File metadata and controls

35 lines (21 loc) · 1.27 KB

Map3 Trustless Crypto Assets API

This repository contains a sampple API server that can be self hosted and provides convenient access to the Map3 Trustless Crypto Assets database.

Installation

Step 1: Clone the Map3 API respository

git clone [email protected]:map3xyz/api

Step 2: Install dependencies

yarn install

Step 3: Setup local environment configuration

A sample environment configuration is provided in the .env.sample file in the root of the repository.

There are 3 variables that can be configured, their usage is as follows:

ASSETDB_DIR - The folder in which the cached database will be downloaded and read
SERVER_PORT - The port on which API server will listen for requests
JWT_SECRET - (Optional) if you wish to secure your API, define a JWT secret that is used to verify any JWT authorised requests token

Step 4: Run the server

We recommend that you start the server wrapped by 'forever' to ensure it is restarted automatically if the server nodejs process crashes. This will ensure maximum availability.

forever start -c "yarn start" -l api.log --append ./ &