/Golang-Mongo-API-template

This is a template for a Golang REST API for future projects. Uses MongoDB Atlas as database provider.

Primary LanguageGoMIT LicenseMIT

Golang-Mongo-API-template

This is a template for a Golang REST API for future projects. Uses MongoDB Atlas as database provider.

Dependencies

How to use

  1. Clone the repository
  2. Create a mongo db cluster on MongoDB Atlas
  3. Create a .env file in the root directory and add the following variables:
MONGOURI=mongodb+srv://user:<password>@cluster0.kgqggff.mongodb.net/?retryWrites=true&w=majority
  1. Run docker compose -f docker-compose-dev.yaml up for development.
  2. Run docker compose -f docker-compose.yaml up for production.