Skip to content

Commit

Permalink
Add more info to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
joon9823 committed Feb 22, 2024
1 parent c4989f7 commit d2f499b
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/`

0 comments on commit d2f499b

Please sign in to comment.