/LetsGo

Learn Go with Github

Primary LanguageGoGNU General Public License v3.0GPL-3.0

LetsGo

CircleCI

Introduction

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.

Step by Step

  1. Fork this repository to start
  2. Write a simple HTTP webserver using echo. This webserver has a single endpoint that is named ping and returns no content with 200 status.
  3. Create docker-compose file that runs mongodb and expose its port.
  4. Add new endpoint with POST method that accept the following JSON and insert it into mongodb geo collection.
{
  "lat": 35.8061619,
  "lng": 51.3987635
}
  1. Use golangci-lint to lint your code 🚀
  2. 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.