diff --git a/docs/topics/Express-Routes.md b/docs/topics/Express-Routes.md new file mode 100644 index 0000000..fc34044 --- /dev/null +++ b/docs/topics/Express-Routes.md @@ -0,0 +1,44 @@ +# Express Routes + +The route paths define the endpoints at which requests can be made. + +Depending on the HTTP method used, the Express router will call the corresponding method handler function. + +## CRUD Operations + +The following table shows the HTTP methods and their corresponding Express router methods: + +| HTTP Method | Express Router Method | CRUD Operation | Description | +| ----------- | --------------------- |----------------|--------------------------------| +| GET | `router.get()` | Read | Retrieve information | +| POST | `router.post()` | Create | Send information to the server | +| PUT | `router.put()` | Create | Create a new resource | +| PATCH | `router.patch()` | Update | Update an existing resource | +| DELETE | `router.delete()` | Delete | Delete an existing resource | + +## Route Paths + +The route paths define the endpoints at which requests can be made. + +Route paths can be strings, string patterns, or regular expressions. + +### Resource Naming + +For this project, we follow the industry standard of naming conventions, +which you may find [here](https://restfulapi.net/resource-naming/). + + + + + + + + + + + + + + + + diff --git a/docs/ucwa.tree b/docs/ucwa.tree index 529226a..1e4836a 100644 --- a/docs/ucwa.tree +++ b/docs/ucwa.tree @@ -7,12 +7,6 @@ start-page="Introduction.md"> - - - - - - @@ -34,4 +28,11 @@ + + + + + + + \ No newline at end of file