Wolfinbarger / game-recommender

A full-stack web app that helps you discover awesome games to play with your friends or solo.
0 stars 0 forks source link

Issue 59: Replace Django with Fastapi #64

Closed FreakyNobleGas closed 4 weeks ago

FreakyNobleGas commented 1 month ago

This PR completely replaces Django with FastAPI in our API, while keeping functionality largely the same as before.

Changes:

Migration Guide: I found it to be much easier to simply recreate the game-recommender database. Django created a lot of tables and other metadata that doesn't do well with running migrations using Alembic.

I was able to drop the database this way:

# Log into postgres
psql -U USER game-recommender
DROP DATABASE game-recommender

Once you recreate the database, I updated the readme to include running migrations and the server itself. The flow should be very similar to what we had before.

Testing

Here is a screenshot after populating the database using parse_dataset.py and hitting our GET /api/games endpoint.

image