Example JSONApi server for the (also example) Hours project.
Just run make
. It will generate a command api-server
.
Get database migration handler:
go get github.com/mattes/migrate
Then, set up schema to database:
migrate -url postgres:///hours\?sslmode=disable -path=db up
Syntax:
api-server [-addr <bind-ip:port>] -db <database bind string>
Where
- addr: listening address. Default: 0.0.0.0:4000
- database bind string: postgres URL
TBD