Skip to content
/ MariaGin Public template

MariaGin is your comprehensive starting point for developing robust and feature-rich backend applications with the Go programming language, based on the Gin web framework

License

Notifications You must be signed in to change notification settings

lushiv/MariaGin

Repository files navigation

Swaggerize Go Gin Backend With MariaDB

MariaGin is your comprehensive starting point for developing robust and feature-rich backend applications with the Go programming language, powered by the Gin web framework. This boilerplate repository comes fully equipped with Swagger documentation and MariaDB MySQL integration, offering a streamlined experience for building scalable and well-documented APIs.

Key Features:

Go  Gin  MariaDB  Swagger  JWT  Redis  Liquibase  rabbitmq  SendGrid  Firebase  AWS_S3  Docker  Script 

Local Machine Setup (Linux)

Follow these steps to set up the project on your local machine:

  • Clone project from git clone https://github.com/lushiv/MariaGin
  • Go the cd MariaGin
  • Install all Dependencies using go get ./...
  • After that Make the script executable using chmod +x start_server.sh
  • After that make .env file from .env.sample and change file basis on your configurations
  • Set up database migration by following the database migration steps
  • Now Run your server using the script: ./start_server.sh
  • Now application is running on : http://localhost:3000/docs/index.html#/

For Database Migration

  • Go to the dir cd MariaGin/db/db_migration/maria_gin_db
  • Next open the file liquibase.properties
  • Now change these things basis on your creation:
  • YOUR_DATABASE_NAME
  • YOUR_DB_USERNAME
  • YOUR_DB_PASSWORD
changeLogFile: maria_gin_db/changelog-master.xml
driver: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/YOUR_DATABASE_NAME?autoReconnect=true&useSSL=false&maxReconnects=10&allowPublicKeyRetrieval=true&createDatabaseIfNotExist=true
username: YOUR_DB_USERNAME
password: YOUR_DB_PASSWORD
logLevel=DEBUG
classpath: ./mysql-connector-java-8.0.19.jar

  • Now that all database configurations have been updated, you can proceed to run ./db_migration.sh

About

MariaGin is your comprehensive starting point for developing robust and feature-rich backend applications with the Go programming language, based on the Gin web framework

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published