Material for my Relay Workshop
You are going to learn Relay and build a mini social network at the end of this workshop
Each lesson including the exercise description can be found in each of the directories of /workshop.
I will explain everything during the intro.
Most of it is written in TypeScript (not particularily well typed). Feel free to use plain JavaScript if you prefer that.
The workshop is a "huge" monorepo with many packages, let's see what's inside:
packages - contains packages and code that make workshop exercises possible
workshop - a set of practice exercises to really learn Relay
solutions - the same folder of workshop but with my solutions
slides - some slides to help in workshop
brew tap mongodb/brew brew install mongodb-community brew services start mongodb-community
docker run -d -p PORT:27017 --name CONTAINER_NAME -d mongo:latest - run mongo:latest image in detached mode
docker tips
docker ps: list all running containers docker ps -a: list all containers (including the exited ones) docker stop CONTAINER_NAME: stop the container docker start CONTAINER_NAME: start the container docker rm CONTAINER_NAME: delete the container to free disk space docker image ls: list all downloaded images docker rmi IMAGE_NAME:TAG: remove image from your computer to free disk space
mongodb+srv://sibelius:[email protected]/test
Server runs at http://localhost:7500/graphql
yarn server
yarn update-schema
yarn seed
yarn relay
Useful for exercises that user should be logged in
yarn get-token
Web and workshops consumes a local .env, you just need to copy the .env.example to .env inside each package
cp .env.example .env
yarn web
weband
serverpackages
yarn start
Example for 01-fetchGraphQL
cd ./workshop/01-fetchGraphQL yarn start
https://forms.gle/uxkoyyeuUSjADC3s7
If you are interested in this workshop as a remote workshop (live), send an email to [email protected] I can run this workshop in English/Portuguese (I'm still learning Spanish)
You can donate to me on Patreon (https://www.patreon.com/sibelius), or Bitcoin