This is the coolest API for Leo's Music Shop.
For now this API only sells bass guitars.
First define a .env
file with two variables, like below:
JWT_SECRET="abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd"
JWE_SECRET="abcdabcdabcdabcd"
SEGMENT_WRITE_ID="your-segment-write-id"
Make sure you have all the requirements installed:
pip install -r requirements.txt
Make sure you have a database created and initialized with data:
python -m commands
Then run it:
uvicorn main:app --reload
First build the image:
docker build -t leos-music-shop-api-python .
Then run it:
docker run -dp 8001:80 -e SEGMENT_WRITE_ID="your-segment-write-id" --name leos-music-shop-api-python leos-music-shop-api-python
This will run the app at port 8001.
There are two documentation systems enabled: