An open API service indexing awesome lists of open source software.

https://github.com/vuki656/dice-betting-api


https://github.com/vuki656/dice-betting-api

Last synced: 6 months ago
JSON representation

Awesome Lists containing this project

README

          

# Dice Betting GraphQL API

## Running the server

1. Make a copy of `.env.example` in `.env`
2. Run `yarn` to install deps
3. Run `yarn database:setup` to create a postgres in docker
4. Run `yarn database:migrate:up` to migrate the database
5. Run `yarn generate:types:graphql:dev` to generate TS types based on GraphQL types
6. Run `yarn dev` to start the server in dev mode

## Running tests

(Do all steps for running the server except starting the server)

1. Run `yarn generate:types:graphql:test` to generate TS types based on GraphQL test operations
2. Run `yarn test` to run tests

## Potential Improvements

- Share `findByPkOrThrow` between models