This is a binary tree implemented in Golang. All the public interface is exposed through a web api using Gorilla Mux
The application runs a web server hosted on port 8080
by default.
To build the application, run the following script in the root folder
make build
To run the built application just run the executable file with
bin/binary-tree
To access it you can either call the endpoints using Postman or curl:
curl -X GET -I http://localhost:8080/health
curl -X POST -I http://localhost:8080/bt/insert/5
curl -X GET http://localhost:8080/bt/contains/5
curl -X GET http://localhost:8080/bt
Run the following script in the root folder
go test -v -cover ./...
or
make test