This service allows to create, update or get port's data.
It starts with some predefined data located in ./assets/ports.jon
.
Tools which should be installed locally:
- make
- docker
Run service on 8080 (by default) host port:
make run
Run service on custom host port:
API_PORT=8081 make run
Get test
port ID:
curl http://localhost:8080/api/v1/ports/test
Create test
port ID:
curl -X POST --data '{ "name": "test", "country":"test", "coordinates": [1,1] }' http://localhost:8080/api/v1/ports/test
Update test
port ID:
curl -X PUT --data '{ "name": "new_test", "country":"test", "coordinates": [1,1] }' http://localhost:8080/api/v1/ports/test
Install third-party tools:
make tools
Run unit tests:
make run-unit-tests
Run integration tests:
make run
make run-tests
make clean
Check quality of code:
make linter