This repository is about a very simple service that starts UDP server
on port written in .env file. It receives raw data in bytes that has a certain
structure in json, decodes it and inserts data to an example table couriers_location.
- Make sure that
.envis filled correctly go buildto build an executable file- Run executable command
./courier-location-tracker
- Open UDP connection with command
nc -u 0.0.0.0 {port}where{port}is filled in.envfile - Send packet
{"courier_id":int,"latitude":float,"longitude":float,"speed":float,"accuracy":float,"azimuth":float} - Check if the record is inserted in table
couriers_location
NOTE: If packet does not match format, service will return error message and record will not be saved!