The Geobin server hosts the Geobin web client as well as the API. It is written in go and uses redis so, assuming you have a working go dev environment and redis server running the following should get you up and running.
> go get github.com/esripdx/geobin.io
> cd $GOPATH/src/github.com/esripdx/geobin.io
> make setup # (runs `go get -t` and `npm install`)
> cp config.json.dist config.json
Geobin comes with a default config.json
file which should get you up and running for development, you'll just need to copy config.json.dist
to config.json
(as listed in the Setup steps above).
-
Host
The http host to listen on"Host": "localhost"
-
Port
The http port to listen on"Port": 8080
-
RedisHost
The redis host (with port)"RedisHost": "127.0.0.1:6379"
-
RedisPass
The redis password"RedisPass": ""
-
RedisDB
The redis db to connect to"RedisDB": 0
-
NameVals
The set of valid characters to be used in the randomly generated binIDs."NameVals": "023456789abcdefghjkmnopqrstuvwxyzABCDEFGHJKMNOPQRSTUVWXYZ"
-
NameLength
The number of chars to be used in each binID."NameLength": 10
> make run
> go test
> go build -o geobin
This assumes you have set up the Go environment required to compile for your destination.
- For cross compilation setup, see this blog from Dave Cheney
To produce a default tar.gz targeted at linux/amd64:
> make tar
If you want to build for a different OS and Arch:
> cd build/
> go run build.go -os myOS -arch myArch
As an example, to build for 32-bit windows:
> cd build/
> go run build.go -os windows -arch 386
The available OS and Arch combinations are listed at the blog linked above.