generated from ctc-uci/npo-template-merged
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
Quote
“Words are blunt instruments, Words are sawn-off shotguns.” - Thom Yorke, Jigsaw Falling Into Place
Description
- Your task is to create backend CRUD routes that will allow us to interact with our database
- CRUD stands for Create, Read, Update, Delete. Each maps to a different function for a RESTful (invented at UCI 🐜) API in Express.js: post, get, put, delete
Instructions
- Create a Express.js file with routes for interacting with the
instrumenttable - Create a Express.js file with routes for interacting with the
instrument_changetable
Notes
- Use the
server/routes/sample.tsas reference for new routes
Acceptance Criteria
-
server/routes/instrument.jscontains CRUD routes for theinstrumenttable- Route for creating an instrument
- Route for reading all instruments
- Route for reading an instrument
- Route for updating an instrument
- Route for deleting an instrument
-
server/routes/instrumentChange.jscontains CRUD routes for theinstrument_changetable- Route for creating an instrument change
- Route for reading all instrument changes
- Route for reading an instrument change
- Route for updating an instrument change
- Route for deleting an instrument change
- Add routes to
server/src/app.ts- instrumentRouter for
/instruments - instrumentChangeRouter for
/instrument-changes
- instrumentRouter for
- Backend routes work, able to test using Postman/curl (Include pictures if possible)
- Be careful because routes will actually affect the database !!
Resources
- DB Model
- Refer to Sample API Route
Metadata
Metadata
Assignees
Labels
No labels