https://github.com/izzypt/got_api
Building a mini app with basic CRUD.
https://github.com/izzypt/got_api
Last synced: 4 months ago
JSON representation
Building a mini app with basic CRUD.
- Host: GitHub
- URL: https://github.com/izzypt/got_api
- Owner: izzypt
- Created: 2022-12-23T18:05:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-07T20:01:57.000Z (over 3 years ago)
- Last Synced: 2025-01-14T21:45:47.332Z (over 1 year ago)
- Language: Vue
- Size: 157 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GoT_API
### Description
As we are fans of Game of Thrones, we would like to have an application that can
show the great houses of the Seven Kingdoms with a few members.
The application will have two distinct entities: houses and members. Each house
represents a family: Stark, Lannister, Baratheon, etc) and members must belong to a house -
Ned Stark belongs to House Stark.
### Functionality:
The API must include CRUD (Create Remove Update Delete) operations for both entities
with validation - you can’t leave members without a house!
When fetching a house, the API should also be able to return all its members and when
fetching a member the API should return the data of the house (s)he belongs to.
## FrontEnd Result
## Backend GraphQL API
## Starting backend
1 - Create virtual environment to keep our dependeciens isolated and avoid packages conflicts
python3 -m venv venv
2 - activate virtual env
ubuntu/Mac -> "source venv/bin/activate"
Win -> ".\venv\Scripts\activate"
3 - Install DJango
$ python -m pip install Django
4 - Install Graphene
$ pip install graphene-django
5 - Install corsheaders to request from different domain than the one that served the web page
pip install django-cors-headers
5 - Output a file to save/track our current packages
$ pip freeze > requirements.txt
Later we can install the same packages from it using : pip install -r requirements.txt