event-porto

command module
v0.0.0-...-7831d8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 10 Imported by: 0

README

Event Management System

Prerequisite 🏆

  • Go Version >= go 1.20
  • PostgreSQL Version >= version 15.0

How To Use

There are 2 ways to do running

With Docker
  1. Copy the example environment file and configure it:
cp.env.example .env
  1. Build Docker
docker-compose build --no-cache
  1. Run Docker Compose
docker compose up -d
Without Docker
  1. Clone the repository or Use This Template
git clone https://github.com/pankop/event-porto.git
  1. Navigate to the project directory:
cd go-gin-clean-starter
  1. Copy the example environment file and configure it:
cp .env.example .env
  1. Configure .env with your PostgreSQL credentials:
DB_HOST=localhost
DB_USER=postgres
DB_PASS=
DB_NAME=
DB_PORT=5432
  1. Open the terminal and follow these steps:
  • If you haven't downloaded PostgreSQL, download it first.
  • Run:
    psql -U postgres
    
  • Create the database according to what you put in .env => if using uuid-ossp or auto generate (check file /entity/user.go):
    CREATE DATABASE your_database;
    \c your_database
    CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; // remove default:uuid_generate_v4() if you not use you can uncomment code in user_entity.go
    \q
    
  1. Run the application:
go run main.go

Run Migrations and Seeder

To run migrations and seed the database, use the following commands:

go run main.go --migrate --seed
Migrate Database

To migrate the database schema

go run main.go --migrate

This command will apply all pending migrations to your PostgreSQL database specified in .env

Seeder Database

To seed the database with initial data:

go run main.go --seed

This command will populate the database with initial data using the seeders defined in your application.

API Documentation

On progress documenting API

Issue / Pull Request Template

The repository includes templates for issues and pull requests to standardize contributions and improve the quality of discussions and code reviews.

  • Issue Template: Helps in reporting bugs or suggesting features by providing a structured format to capture all necessary information.
  • Pull Request Template: Guides contributors to provide a clear description of changes, related issues, and testing steps, ensuring smooth and efficient code reviews.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL