A lightweight backend system built in Go designed to simplify the management and access to data through APIs. An example model, migration and controller have been provided for demonstration purposes
- Database Migrations: Easily create, manage, and rollback database migrations using simple command-line operations.
- ORM: A simple ORM that allows you to interact with the database using Go structs (XORM).
- API Controllers: Facilitate and manage RESTful APIs that enable clients to interact with the backend.
- Go (version 1.22 or higher)
- A PostgreSQL Database
Clone the repository
git clone https://github.com/lytexdev/Gyad.gitRename the .env.example file to .env and adjust the values
cp .env.example .envRun the web server
go run cmd/main.goCreate Migration
go run cmd/migration/migration.go create boberRun all migrations:
go run cmd/migration/migration.go migrate allMigrations are executed one after the other based on the timestamps.
Run specific migratrion:
go run cmd/migration/migration.go migrate boberRollback specific migration:
go run cmd/migration/migration.go rollback boberCreate migration binary file:
go build cmd/migration/migration.goThis project is licensed under the MIT License. See the LICENSE file for details.