Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.
/ backend-poc-2 Public archive

This was an exploration into making a Brunstad.tv backend using go and ReactAdmin

Notifications You must be signed in to change notification settings

BCC-Media/backend-poc-2

Repository files navigation

BCC.Media logo

BrunstadTV Backend (In development)

Getting started

Prerequisites

First steps

  • Run docker-compose up in the /local-setup folder. This sets up a postgres database and Typesense.
  • Run migrations. See Migrations
  • Open the go project at backend/admin/ (or run make admin-backend)
  • Open frontend and run pnpm install and pnpm start

More details

Database

Migrations

In order to be able to run migrations install this: https://github.com/golang-migrate/migrate/tree/master/cmd/migrate

Create a new migration

migrate create -ext sql -seq -dir backend/db/migrations name

Run migrations

migrate -database "postgres://postgres:password@localhost:5432/postgres?sslmode=disable" -path backend/db/migrations` <up|down>

Mocking

  • Use mock-data (but make sure this PR is merged, otherwise build the branch from our repo)
  • Run: mock custom -f db/mock/mock_skeleton.yaml --database postgres -v --password password
  • Note: This removes all constraints, mocks, then recreates the constraints. It currently fails to recreate all the constraints, so keep that in mind.

Makefile

Many of the commands are in the Makefile. For example:

make migrate
make test-build

Admin API

Follows the convention defined by ra-data-json.

About

This was an exploration into making a Brunstad.tv backend using go and ReactAdmin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published