Skip to content

initia-labs/simple-indexer

Repository files navigation

Simple Indexer

This is a simple indexer for initia.

Project setup

1. Clone

$ git clone https://github.com/initia-labs/simple-indexer.git

2. Install packages

npm install

3. Setup the database

Simple-indexer requires PostgreSQL as a backend database and TypeORM as an ORM.

4. Configure Environment Variables

Name Description Default
SERVER_PORT Server port 3000
START_HEIGHT Indexing start height 1
LOG_LEVEL Log level
RPC_URL RPC URL 'http://localhost:26657'
THROTTLE_TTL api throttle ttl
THROTTLE_LIMIT api throttle limit

We use dotenv for managing environment variable for development. See sample of .env

How to run

Developement

npm run dev

Production

npm run start

API documentation

  • Access UI from: http://localhost:3000/swagger/