https://github.com/dwarvesf/go-api
Go boilerplate can streamline the process of starting new projects by providing a predefined structure and foundational code to build upon
https://github.com/dwarvesf/go-api
Last synced: about 2 months ago
JSON representation
Go boilerplate can streamline the process of starting new projects by providing a predefined structure and foundational code to build upon
- Host: GitHub
- URL: https://github.com/dwarvesf/go-api
- Owner: dwarvesf
- Created: 2023-08-08T06:50:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-29T09:16:51.000Z (about 2 years ago)
- Last Synced: 2025-03-20T09:58:20.641Z (about 1 year ago)
- Language: Go
- Size: 190 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project Name
Short description of your project.
## Table of Contents
- [About](#about)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Running the Development Server](#running-the-development-server)
- [Generating Swagger Documentation](#generating-swagger-documentation)
- [Generating Mock Interfaces](#generating-mock-interfaces)
- [Running Tests](#running-tests)
- [Database](#database)
- [Starting the Development Database](#starting-the-development-database)
- [Starting the Testing Database](#starting-the-testing-database)
- [Migrations](#migrations)
- [Contributing](#contributing)
- [License](#license)
## About
Briefly describe your project, its purpose, and its main features.
## Getting Started
### Prerequisites
- Go (add specific version)
- Docker (add specific version)
- ...
### Installation
1. Clone the repository:
```bash
git clone git@github.com:dwarvesf/go-api.git new-project
cd new-project
```
2. Install project dependencies:
```bash
make setup
```
## Usage
### Running the Development Server
Start the development server:
```bash
make dev
```
### Generating Swagger Documentation
Generate Swagger documentation:
```bash
make gen-swagger
```
### Generating Mock Interfaces
Generate mock interfaces:
```bash
make gen-mocks
```
### Running Tests
Run tests with the testing database:
```bash
make test
```
## Database
### Starting the Development Database
Start the development database container:
```bash
make pg-start-dev
```
### Starting the Testing Database
Start the testing database container:
```bash
make pg-start-test
```
### Migrations
Apply pending migrations:
```bash
make pg-migrate-up
```
Rollback the last migration:
```bash
make pg-migrate-down
```
## Contributing
Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to this project.
## License
This project is licensed under the [License Name](LICENSE).