Skip to content

stegoer/server

Repository files navigation

server

Continuous Deployment Continuous Integration pre-commit.ci status Go Reference Go Report Card

Server is using Go, Postgres, GraphQL and Redis.


Server endpoint: https://apistegoer.lukaskucera.com/

Development documentation: https://github.com/stegoer/server/blob/main/README.md

Reference documentation: https://pkg.go.dev/github.com/stegoer/server

Source code: https://github.com/stegoer/server


Installation

Install instructions

  1. Install Go https://go.dev/doc/install
  2. Install PostgreSQL https://www.postgresql.org/download/
  3. Install Redis https://redis.io/docs/getting-started/
  4. Clone this repository
git clone git@github.com:stegoer/server.git
  1. Install dependencies
go get ./...

Create the .env file

Create a .env file and copy the contents of .env.example file into the .env file

cp .env.example .env

Initialize database

make db-init

Development

Dev server

make dev

Redis server

redis-server

Make

make help

Ent

ent is used as an ORM in combination with the repository pattern. Schemas can be found in the folder ent/schema.

GraphQL

GraphQL schemas are located in the folder graphql. GraphQL server code is generated via gqlgen. Its output and resolvers can be found in the gqlgen folder.

Migrations

Database migrations are located in the folder migrations. Migrations are managed with Makefile.

Tools

Tools is a small Go module which contains CLI tooling which is used mainly via Makefile commands.

Contributing

pre-commit install

License

Developed under the MIT license.