Skip to content

delta/orientation-backend

Repository files navigation

Backend for Utopia - Orientation'21

Prerequisites

Migrations

  • Install
go install -tags 'mysql' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
  • Create Migrations
migrate create -ext sql -dir ./migrations <MIGRATION_NAME>
  • Up Migrations
migrate -path "./migrations" -database "mysql://root:YOUR_MYSQL_PASSWORD@/utopia" up
  • Down Migrations
migarte -path "./migrations"  -database "mysql://root:YOUR_MYSQL_PASSWORD@/utopia" down

Setup

  • Run cp .sample.env .env, fill the env variables

  • Run cp dauth.config.example.json dauth.config.json, fill the required creds

  • start server

    • development

      air
    • production

      go run main.go

Docker Setup

  • Install docker and docker-compose
  • Run cp .docker.sample.env .docker.env, fill the env varaiables
  • Run docker-compose up to start the services

About

Backend for Utopia - Orientation'21

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •