Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bartekpacia/flashwise
Backend for a flashcard-based educational app.
https://github.com/bartekpacia/flashwise
Last synced: 14 days ago
JSON representation
Backend for a flashcard-based educational app.
- Host: GitHub
- URL: https://github.com/bartekpacia/flashwise
- Owner: bartekpacia
- Created: 2023-10-14T00:34:12.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-22T04:36:15.000Z (11 months ago)
- Last Synced: 2024-12-12T15:08:19.472Z (22 days ago)
- Language: Go
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flashwise backend
Backend for the Flashwise app.
## Testing
1. Create a user
```
http POST localhost:8080/register \
username="charlie" \
email="[email protected]" \
password1="tiger123" \
password2="tiger123"
```1. Create a flashcard set:
```
http POST localhost:8080/sets \
'Authorization: Token 6d0c1a5ecb334e176c5d13e8d24c282a8b45684d' \
is_public:=true \
name='Geography'
```1. Get user's flashcard sets:
```
http GET localhost:8080/sets \
'Authorization: Token 6d0c1a5ecb334e176c5d13e8d24c282a8b45684d'
```1. Create a flashcard
```
http POST localhost:8080/flashcards \
'Authorization: Token 6d0c1a5ecb334e176c5d13e8d24c282a8b45684d' \
front="Capital of Poland" \
back="Warsaw" \
flashcard_set:=1
```1. Get user's flashcards:
```
http GET localhost:8080/flashcards \
'Authorization: Token 6d0c1a5ecb334e176c5d13e8d24c282a8b45684d'
```## Development
To execute query directly in the database container:
```
docker exec -it flashwise-database-1 mysql -u root -psecret -e "USE flashwise; SELECT id, author_id FROM flashcard_sets;"
``````
docker exec -it flashwise-database-1 mysql -u root -psecret -e "USE flashwise; SELECT id, front, back, author_id FROM flashcards;"
```# Resources
- [Illustrated guide to SQLX](https://jmoiron.github.io/sqlx)