This is a demo project that was made by me to understand how Svelte and Express JS work together to create a web app.
catAPItest
database and a cats
collection via mongosh
or mongo
.npm run build
.npm start
.http://localhost:3000
.POST /apiv1/addCat
- provide valid cat request data in request's body to create a cat.GET /apiv1/cats
- returns all cats in DB.DELETE /apiv1/deleteCat/[id]
- provide valid ID to delete a cat.PATCH /apiv1/editCat/[id]
- provide valid ID and cat data in request's body to edit a cat. It replaces the entire entry.Other users can connect and preform CRUD operations via the webapp or via the API directly. Client's local copies of cats are updated when changes happen, however, these changes aren't shared between clients. That would require implementing WebSocket connections, which is WIP.