-
Download Go
-
Setup and test your Go installation
-
Install the Go dependencies
go get github.com/tools/godep go get github.com/melvinmt/firebase
-
In a terminal, issue the following command to run the server
go build -o main
This will compile the program as "main"
You can then run the program (i.e. launch the server) with:
./main
-
To run tests, do
go test -cover -race ./...
If you want to generate test coverage output, use:
go test -coverprofile=out.cov ./...
You can then view the coverage report in your browser with:
go tool cover -html=out.cov
-
If add new files don't forget to run
godep save -r ./...
-
These are the available endpoints:
URL Method DESC. /
GET
"index" page /users
GET
List all users /users/NAME
GET
List a user /users
POST
Create a user /users
PUT
Update a user /users
DELETE
Delete a user For each "non"
GET
request, send the following parameters in the requestBODY
{ "name": "the users name", "nicknames": ["the users nicknames"] }