PabloCacciagioni / project_golang

0 stars 0 forks source link

project_golang

This is an example project in Go using GORM and Fiber.

Requirements

Configuration and Execution

Step 1: Clone the repository

git clone https://github.com/PabloCacciagioni/project_golang.git
cd project_golang

Step 2: Configure the environment

Make sure you have Docker and Docker Compose installed on your system.

Step 3: Lift the containers

Lift database and application containers using Docker Compose:

docker-compose up -d

This will raise two services:

Step 4: Database migrations

Runs the database migrations to create the necessary tables. This is done automatically on application initialization when connecting to the database.

Step 5: Run the application

The application should be running at http://localhost:8000.

Available routes

Test

To run the tests, make sure the Docker containers are running, and then run:

go test -v routes_test.go

Project structure