Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emrekb/fiber-boilerplate
Fiber project boilerplate with postgres
https://github.com/emrekb/fiber-boilerplate
api boilerplate docker docker-compose fiber go grafana pgx prometheus redis sqlc template
Last synced: about 22 hours ago
JSON representation
Fiber project boilerplate with postgres
- Host: GitHub
- URL: https://github.com/emrekb/fiber-boilerplate
- Owner: EmreKb
- Created: 2025-02-01T21:34:20.000Z (8 days ago)
- Default Branch: main
- Last Pushed: 2025-02-05T14:27:48.000Z (5 days ago)
- Last Synced: 2025-02-05T15:35:54.518Z (5 days ago)
- Topics: api, boilerplate, docker, docker-compose, fiber, go, grafana, pgx, prometheus, redis, sqlc, template
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fiber Boilerplate
A boilerplate project for building backend services using the Fiber framework in Go. This project includes Docker support, database integration, and monitoring setup.
## Description
This project serves as a starting point for developing a RESTful API using Go with Fiber. It includes:
- Docker and Docker Compose configuration for containerization
- Database integration with SQLC
- Migration setup
- Monitoring with Prometheus and Grafana## Installation
To set up the project, follow these steps:
1. **Clone the repository:**
```bash
git clone https://github.com/EmreKb/fiber-boilerplate
cd fiber-boilerplate
rm -rf .git
```2. **Install Go and dependencies:**
Ensure you have Go installed on your system. Then, install the project dependencies:
```bash
go mod tidy
```3. **Set up Docker and Docker Compose:**
Install Docker and Docker Compose if you haven't already.
4. **Copy the environment file:**
```bash
cp .env.example .env
```Update the `.env` file with your specific configurations.
5. **Install SQLC:**
Install SQLC for database operations:
```bash
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
```6. **Start the server:**
Use the provided Makefile to start the server:
```bash
make run
```## Usage
### Running the Server
To start the server:
```bash
make run
```## Contributing
Contributions are welcome! If you'd like to contribute to this project, please:
1. Fork the repository.
2. Create a new branch for your feature or bug fix.
3. Commit your changes with clear commit messages.
4. Open a Pull Request against the `main` branch.