Skip to content

Lamden/block-explorer-api

Repository files navigation

Running the Lamden Block Explorer API Locally

Dependancies

Install MongoDB

Install Block-Explorer-API

git clone https://github.com/Lamden/block-explorer-api.git
cd block-explorer-api
npm install

Create lamden config with masternode info

nano config/lamden.js
module.exports = ({ env }) => ({
  masternodes: ["https://masternode-01.lamden.io", "https://masternode-02.lamden.io"]
});

Create JWT token

  1. Generate a secure token.
openssl rand 64 | base64
  1. Create .env file in root of the block-explorer-api directory
nano .env
  1. Add token info (ctrl-x, "y" to exit and save)
ADMIN_JWT_SECRET=token_generated_above
URL=http://127.0.0.1/api

Run

npm run develop

Run with PM2

  1. Download PM2
npm install pm2 -g
  1. Run with PM2
pm2 start npm --name "block-explorer-api" -- run prod-nowipe

Admin Console

Login to the admin console at http://localhost:1337/admin

Extra Config

Set Route permissinos

  • Navigate to set the user permissions
  • Click "Public"
  • Under Application click "Select All" beside each Section
  • Deselect "count", "create" and "delete" for each Section
  • Click "Save"

About

API server for the block explorer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published