GOLANG REPO TEMPLATE
Introduction
Briefly introduce your Golang REST API project here. Provide context about what problem it solves and why it's valuable.
Table of Contents
Features
- 🔱 Clean architecture (handler->service->repository)
- 📖 Standard Go project layout
- 💿 CI/CD with GitHub Actions
- 🐳 Docker compose
- ⚙️ Makefile
- 🗃️ MongoDB connection
- ✔️ Unit/E2E tests with mocks and testify
- 🚦 Graceful shutdown
Prerequisites
Before you can run this project, make sure you have the following prerequisites installed:
-
Go 1.21+: You'll need Go 1.21 or a later version installed. You can download and install Go from the official website: https://golang.org/dl/
-
MongoDB: You'll need a MongoDB server running locally or accessible from your development environment. You can download and install MongoDB from the official website: https://www.mongodb.com/try/download/community
-
Make: Make sure you have Makefile installed. Most Unix-like systems have it pre-installed. For Windows, you can use tools like Make for Windows.
OR
-
Docker: If you prefer a containerized environment that includes MongoDB, you can use Docker. You can download and install Docker from the official website: https://docs.docker.com/get-docker/
Additionally, this project includes a Docker Compose file that sets up the necessary services, including MongoDB, to run the application. Make sure you have Docker Compose installed as well: https://docs.docker.com/compose/install/
Once you have these prerequisites in place, you can proceed with setting up and running the project.
Usage
TODO
Explain how to use your API. Include code examples, endpoints, and any required parameters.
# Example usage
$ curl -X GET http://localhost:8080/api/endpoint
Configuration
TODO
Explain how to configure your API, including environment variables, configuration files, or any other relevant settings.
# Example configuration
$ export API_KEY=your-api-key
$ ./your-api
License
This project is licensed under the MIT License.