backend

module
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT

README

Mensatt Backend

Development Deployment

The backend repository for Mensatt written in go.

Requirements

  • Docker & Docker Compose
  • Go 1.22

Building

  • Generate all: make generate
  • Run only gqlgen: make gqlgen
  • Run only entc: make entc

Running

  • Start dev server: make up
  • Stop the server: make down

Migrations

Migrations require Atlas to be installed. See here for installation instructions.

Create a new migration:

atlas migrate diff <migration_name> \
 --dir "file://internal/database/migrations" \
 --to "ent://internal/database/schema" \
 --dev-url "postgres://mensatt:mensatt@localhost:5432/mensatt?search_path=public&sslmode=disable" \
 --format '{{ sql . "	" }}'

The --format flag uses a tab as indentation. If you want to manually edit this command you can use ctrl + v + tab to insert a tab character in your shell.

Jump to

Keyboard shortcuts

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