/gobazel

Example of using Go and Bazel

Primary LanguageStarlarkThe UnlicenseUnlicense

gobazel

Example of using Go and Bazel

Requirements

Install bazelisk (see here). I think that easiest way is to execute:

go get github.com/bazelbuild/bazelisk

Run server

bazelisk run server/cmd

Fire requests

# Good
curl --request POST 'http://localhost:8080/compute' --header 'Content-Type: application/json' --data-raw '{"Op": "add","Lh": 1,"Rh": 5}'

# Bad
curl --request POST 'http://localhost:8080/compute' --header 'Content-Type: application/json' --data-raw '{"Op": "mul","Lh": 1,"Rh": 5}'