Provinite / clovercoin-app

0 stars 0 forks source link

Installation

Dependencies

You'll need nodejs and yarn. Optionally docker for postgres.

Clone the repo

git clone git@github.com:provinite/clovercoin-app.git

Install

yarn install

Start Postgres

docker run --name clovercoin-app-postgres -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres

Running The Apps

Server

To run the server,

cd packages/api
yarn start

It will start on http://localhost:3000/

Client

To run the client,

cd packages/client
yarn start

It will start on http://localhost:1234

Development

Client Type Generation

The client's graphql SDK is auto-generated by the graphql-codegen cli. Each time the server starts, it emits its schema definition in packages/api. To import this definition into the client and update the types after an API change:

cd packages/client
yarn codegen

This will regenerate the src/generated/graphql.ts file and run it through eslint --fix.