Skip to content

lytexdev/Gyad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gyad - Get Your API Data

Overview

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

Features

  • 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.

Installation

Prerequisites

  • Go (version 1.22 or higher)
  • A PostgreSQL Database

Clone the repository

git clone https://github.com/lytexdev/Gyad.git

Rename the .env.example file to .env and adjust the values

cp .env.example .env

Run the web server

go run cmd/main.go

Usage

Migration

Create Migration

go run cmd/migration/migration.go create bober

Run all migrations:

go run cmd/migration/migration.go migrate all

Migrations are executed one after the other based on the timestamps.

Run specific migratrion:

go run cmd/migration/migration.go migrate bober

Rollback specific migration:

go run cmd/migration/migration.go rollback bober

Create migration binary file:

go build cmd/migration/migration.go

License

This project is licensed under the MIT License. See the LICENSE file for details.

Releases

No releases published

Packages

No packages published

Languages