đŒ CAT Express đ
With CatExpress you can Create, Read, Update and Delete cat breeds
Features
đœAdd breed
- Add a breed by clicking on the big plus button which says "Add Breed".
- Fill out the information.
- If you leave the image field blank, a default cat image will be used.
- Click Submit.
- A toast message will tell you the breed has been added.
đ Edit breed
- Edit a breed by clicking on the cat breed you want to edit, in the grid.
- Click the edit button (đ) on the top left.
- Edit the form to your needs.
- Click submit.
- A toast message will tell you the breed has been updated.
đż Delete breed
- Delete a breed by clicking on the breed you want to delete, in the grid.
- Click the delete button (đïž) on the top left.
- A toast message will tell you the breed has been deleted.
đ» Search breed
- Click the search bar on the top left to find a specific cat breed.
- Search filters out breeds based on breed names.
đ±â CatExpress data
CatExpress consists of a server side and a client side
- The server side is built on TypeScript using Express.
- The client side is built on Svelte using Vite.
- By default the CatExpress server runs on
localhost
and port 3000
Requirements
Node.js
npm
Project
Set up
git clone https://github.com/4l3x91/expressapi.git
Server
Set up
cd server
npm install
Build and run
tsc
npm run start
Run dev (nodemon)
npm run dev
Endpoints
Method |
URL |
Description |
GET |
/api/cats/ |
Retrieve all cat breeds. |
GET |
/api/cats/id/abys |
Retrieve breed with id "abys". |
PUT |
/api/cats/abys |
Update breed with id "abys". |
POST |
/api/cats/ |
Add a new breed. |
DELETE |
/api/cats/id/abys |
Delete breed with id "abys". |
# |
|
|
Client
Set up
cd client
npm install
Build (vite build)
npm run build
Run (vite)
npm run dev
Krav för godkÀnt
Krav för vÀl godkÀnt