From d2f499bdaa88eace9b8f3c49095f9caa90216b80 Mon Sep 17 00:00:00 2001 From: joon9823 Date: Thu, 22 Feb 2024 15:46:44 +0900 Subject: [PATCH] Add more info to README.md --- README.md | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e30b2bb..e956b81 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,42 @@ This is a simple indexer for initia. -# How to use +# Project setup +### 1. Clone ```bash -npm i +$ git clone https://github.com/initia-labs/simple-indexer.git ``` +### 2. Install packages ```bash -npm run start +npm install ``` -# Configuration +### 3. Setup the database +Simple-indexer requires PostgreSQL as a backend database and [TypeORM](https://github.com/typeorm/typeorm) as an ORM. +### 4. Configure Environment Variables | Name | Description | Default | |-------------------------|------------------------------------------------|---------------------------------------| -| SERVER_PORT | Server port | 6000 | +| SERVER_PORT | Server port | 3000 | +| MONITOR_INTERVAL | Monitor interval | 100 | | LCD_URL | LCD URL | 'http://localhost:1317' | | RPC_URL | RPC URL | 'http://localhost:26657' | + +> We use [dotenv](https://github.com/motdotla/dotenv) for managing environment variable for development. See [sample of .env](.env_sample) + +# How to run + +### Developement +```bash +npm run dev +``` + +### Production +```bash +npm run start +``` + +# API documentation +- Access UI from: `http://localhost:3000/swagger/`