# 树莓派 bty主链ticket统计和接口服务

## Installation
```
$ go get chain33-pai
```

## How to run

### Required

- Mysql
- Redis

### Ready

create database raspberry docs/sql/raspberry.sql)

### Conf

You should modify `conf/app.ini`

```
[database]
Type = mysql
User = root
Password =
Host = 127.0.0.1:3306
Name = blog
TablePrefix = blog_

[redis]
Host = 127.0.0.1:6379
Password =
MaxIdle = 30
MaxActive = 30
IdleTimeout = 200
...
```

### Run
```
$ cd $GOPATH/src/chain33-pai

$ go run ./cmd/api/main.go

$ go run ./cmd/parser/main.go
 
```

Project information and existing API

```
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /api/v1/articles          --> chain33-pai/routers/api/v1.GetArticles (4 handlers)

```