The goal of the project is to create a simple full-stack app using GraphQL. The app is implemented with React on the frontend and Django on the backend. The final app is deployed on Heroku and you can see the live app on https://hangman-react-django.herokuapp.com/.
Within this project you will find examples of:
- React components with Apollo Client
- Frontend unit test with Jest and React Testing Library
- Django web framework
- GraphQL API with Graphene
- Backend unit test with Pytest
Note: You should have Pipenv installed in your computer before moving to the next step.
- From the root folder, run
pipenv install
to install python packages. (first time only) - Run
pipenv shell
to enter the project's virtual environment. - Run
python manage.py migrate
to create database. (first time only) - Run
python manage.py loaddata ./hangman/fixtures/*
to load data. (first time only) - Run
python manage.py runserver
to start the backend server.
To start backend unit test, run py.test
Note: You should have npm or Yarn installed in your computer before moving to the next step.
- From the root folder, run
npm install
oryarn install
to install node modules. (first time only) - With the backend server started, run
npm start
oryarn start
and the app will be running in development mode. Open http://localhost:3000 to view it in the browser.
To start the frontend unit test, run npm test
or yarn test