Skip to content

An backend online learning platform that is designed for those who want to carry out learning and equivalency exams for package A, B, C with customizable material & exam questions prepared by flexible and easily accessible instructors and students.

Notifications You must be signed in to change notification settings

nibroos/elearning-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Backend E-Learning

🚀 Quick Start

Developement Environment

On / dir, Run make copy-env, Modify to suit your environment, focus on these key, you can leave others as it is. The key name is explanatory itself.

# MAIN APP PORT
GATEWAY_PORT=4050

# DATABASE
POSTGRES_PORT=5432

Without docker, you need to install air-verse to activate the hot reloading.

🐳 Docker :: Container Platform

Docker Install.

  • On the root folder, Starts the containers in the background and leaves them running : docker-compose -f docker/docker-compose-dev.yml up --build -d
  • Stops containers and removes containers, networks, volumes, and images : docker-compose down

🛎 Available Commands each Service

Change bash directory to each service.

${arg} means replace all of it match your args without space

  • Run export path : export PATH="$PATH:$(go env GOPATH)/bin"
  • Create mirgration : make migrate-create name=${your_migration_name}
  • Run migration : make migrate-up
  • Stepback migraiton: make migrate-down
  • Generate proto file, leave the proto args blank if you want to generate all proto file: make proto ${your-proto.proto}. If its fail, run this command on specific service. for example, in /service/ run bash export PATH="$PATH:$(go env GOPATH)/bin"
  • Create seeder : make seed-create name=${your_seeder_name}
  • Run seeder : make seed-run file=${your_seeder_name}.sql

💎 The Package Features

  

  

📔 Notes & Issues

dial tcp: lookup postgres: no such host

Change the makefile DB_HOST to localhost if run in local env, when running on docker, change it to postgres.

run multiple seeder in one execution

You can run multiple seeder references in the seeder_controller.go file.

error running migration fix migration

Change the 'version' column name on schema_migrations to latest succeed migration, change the 'dirty' column to false, then run the migration again

postgre extensions

CREATE EXTENSION IF NOT EXISTS pgcrypto;

📗 API Document

All endpoints stored in -.json


Features

Feel free to ask if you have any questions or need more details!

About

An backend online learning platform that is designed for those who want to carry out learning and equivalency exams for package A, B, C with customizable material & exam questions prepared by flexible and easily accessible instructors and students.

Topics

Resources

Stars

Watchers

Forks