This project is a simple REST API built using Go and the Fiber framework. It demonstrates how to set up a basic web server and define routes.
- Go (version 1.16 or later)
- Fiber framework
- Database setup (e.g., MongoDB, PostgreSQL)
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install dependencies:
go mod tidy
Before running the application, ensure you have the following environment variable set:
DB_NAME: The name of your database.
You can also set the PORT environment variable to specify the port on which the server will run. If not set, it defaults to 8080.
To start the server, run:
go run main.go
main.go: The entry point of the application where the Fiber app is initialized and routes are set up.routes/: Contains route definitions.database/: Handles database connections and operations.utils/: Utility functions for configuration and other common tasks.