Skip to content

Commit

Permalink
use block result instead of txsearch, replace koa to nestjs
Browse files Browse the repository at this point in the history
  • Loading branch information
ALPAC-4 committed Oct 16, 2024
1 parent d2f499b commit f35a885
Show file tree
Hide file tree
Showing 43 changed files with 4,626 additions and 5,053 deletions.
7 changes: 5 additions & 2 deletions .env_sample
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ TYPEORM_ENTITIES=src/orm/*Entity.ts
TYPEORM_MIGRATIONS=src/orm/migration/*.ts

SERVER_PORT=3000
MONITOR_INTERVAL=100
LCD_URL=http://localhost:1317
START_HEIGHT=1
LOG_LEVEL=info
RPC_URL=http://localhost:26657

THROTTLE_TTL=60
THROTTLE_LIMIT=20
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,48 @@ This is a simple indexer for initia.
# Project setup

### 1. Clone

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

### 2. Install packages

```bash
npm install
```

### 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 | 3000 |
| MONITOR_INTERVAL | Monitor interval | 100 |
| LCD_URL | LCD URL | 'http://localhost:1317' |
| RPC_URL | RPC URL | 'http://localhost:26657' |

| 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](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/`
Loading

0 comments on commit f35a885

Please sign in to comment.