This is a Backend REST API Project using Golang
This repository is fiiled with Backend Projects using
- Golang as a programming language
- Mysql as a database
- GORM as a Database ORM for mysql on Golang
- Gin as Golang Frameworks
- and Golang Migrate as a Migration database structure
Requirement
1. mysql database
2. Goland version > 1.20
3. Go migrate CLI
First, create your mysql database. in this project, we create database using tinderleaked as a database name.
Second, create .env or edit the .env.example file on folder config with your own value
Run migrate for database using this command
migrate -database "mysql://{your_mysql_username}:{your_mysql_password}@tcp({your_mysql_host}:{your_mysql_port})/tinderleaked" -path db/migrations up
Run the development server:
go run main.go
Open http://localhost:{SERVICE_PORT} with your browser to see the result.
you can access API documentation for this project in here Documentation, or the postman.collection in this repository