It is the Drone Navigation Service written in Go.
It only has one route (POST) and that is /v1/dns
which is responsible for calculating the location from given coordinates and velocity.
Request body sample:
{
"x": "90.5",
"y": "219",
"z": "11",
"vel": "15.6"
}
Note: Be careful about the double quotes!
Response sample:
{
"loc": 3220.6
}
go test ./...
First, you need to create .env
file based on .env.example
.
Note: If you do not include DNS_PORT in the file, app will be served on 8080.
docker-compose build
docker-compose up
Be sure to install Go on your machine (1.12 preferred).
go mod download
go run main.go