2018-04-10 19:44:35 -07:00
|
|
|
hdx
|
|
|
|
=============================
|
2018-04-10 19:17:26 -07:00
|
|
|
|
2018-04-10 19:44:35 -07:00
|
|
|
Simple IP counting web service
|
2018-04-10 19:17:26 -07:00
|
|
|
|
2018-04-10 19:44:35 -07:00
|
|
|
Installing From Source
|
|
|
|
==============================
|
|
|
|
|
|
|
|
Move the `hdx` directory in the root of your `$GOPATH`. Once there, you can
|
|
|
|
install by running
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ go install hdx/...
|
|
|
|
```
|
|
|
|
|
|
|
|
This will yield a binary called `hdxd`. `hdxd` comes with its own usage:
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ hdxd run -h
|
|
|
|
|
|
|
|
run hdxd with given options
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
app run [flags]
|
|
|
|
|
|
|
|
Flags:
|
|
|
|
-h, --help help for run
|
|
|
|
-n, --host string hostname
|
|
|
|
-p, --port int port (default -1)
|
|
|
|
```
|
|
|
|
|
|
|
|
`hdxd` can be run by giving these flags values. For example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ hdxd run -p 8080
|
|
|
|
```
|
|
|
|
|
|
|
|
is the most basic way to run the application.
|
|
|
|
|
|
|
|
Expects a Postgres DB with DBName 'hdx', DBUser 'dm' and running on localhost:5432
|
2018-04-10 19:47:22 -07:00
|
|
|
|
|
|
|
Running:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
docker run --name some-postgres -p 5432:5432 -e POSTGRES_USER=dm -e POSTGRES_DB=hdx -d postgres
|
|
|
|
```
|
|
|
|
|
|
|
|
Should get you a postgres DB running you can use to try it out.
|