The aim of this project is to provide a basis to write a simple HTTP service in Go. Do not push anything on this project, you must fork it then write your code and make a pull request to it.
- Fork this repository to start
- Write a simple HTTP webserver using echo. This webserver has a single endpoint
that is named
ping
and returns no content with 200 status. - Create docker-compose file that runs mongodb and expose its port.
- Add new endpoint with POST method that accept the following JSON and insert it into mongodb
geo
collection.
{
"lat": 35.8061619,
"lng": 51.3987635
}
- Use golangci-lint to lint your code 🚀
- Write tests for your endpoints. In the tests you must use MongoDB and check your recently created record.
For conntecting to Mongodb use the offical driver that can be found here.