/wao

Wrong answers only

Primary LanguageTypeScript

Wrong Answers Only

Ask questions or answer it wrong.

The purpose of this project is to show some knowldge I have gained with GraphQL + Express + Prisma. There is also an HTTP REST API in the backend to address the Question domain, a simple CRUD, from which I have built the GraphQL service.

Dependencies

  • Node.js 13+
  • Yarn
  • Docker

Backend

PostgreSQL set-up

Download postgres image

docker pull postgres:latest

Setup postgres container with name wao-postgres

docker run --name wao-postgres -p 5432:5432 -e POSTGRES_PASSWORD=itswrong -d postgres

Enter the container

docker exec -it wao-postgres bash

Enter the database server

psql -U postgres

Add UUID extension

create extension if not exists "uuid-ossp";

Check installation

select uuid_generate_v1();

Install packages

yarn install

Prisma ORM

Generate the migration script after modeling

yarn prisma migrate dev --name init --preview-feature

Build the Prisma client every time after change the scheme

yarn prisma generate

Run

yarn start

Frontend

Install packages

yarn install

Run

yarn start

Reference

Clientes