Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 2.12 KB

README.md

File metadata and controls

67 lines (45 loc) · 2.12 KB

HydroScan API

CircleCI Go Report Card Docker Cloud Automated build Docker Cloud Build Status Uptime Robot status

The HydroScan backend built with Go. Collects data about Hydro Protocol exchanges and provides methods for a client to consume the data.

Components

Cron

A scheduler to pull a variety of data about running Exchanges, including current token price, trade volume, etc.

Server

Provides an API for the HydroScan client to query for data.

Requirements

  • Go version >= 1.11
  • Postgres
  • Redis

Getting Started

  1. Clone this repo to somewhere outside of GOPATH
  2. Copy .config.sample.yml to .config.yml and Set valid urls for Postgres and Redis
  3. Install the dependencies:
go mod download

If you get an error like this:

go: modules disabled inside GOPATH/src by GO111MODULE=auto; see 'go help modules'

It means you have cloned the repo inside GOPATH. To solve this, you can try cloning this repo to somewhere outside of GOPATH. Alternatively, if you want to work in your GOPATH:

$ export GO111MODULE=on    # manually active module mode

Run Cron

go run ./cmd/cron/cron.go

Run API Server

go run ./cmd/server/server.go    # Started on port 8080 by default

Contributing

  1. Fork it (https://github.com/hydroscan/hydroscan-api/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request