Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/el634dev/chai-testing-challenges
https://github.com/el634dev/chai-testing-challenges
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/el634dev/chai-testing-challenges
- Owner: el634dev
- Created: 2024-04-19T15:54:05.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-07-28T17:54:34.000Z (5 months ago)
- Last Synced: 2024-07-28T19:13:36.734Z (5 months ago)
- Language: JavaScript
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Testing Challenges
Clone this repository, then run `npm install` to install all necessary packages and dependencies.
Completed all TODOs in `src/routes/message.js` and `src/test/message.js`. Then, ran tests to ensure that they pass.
## Endpoints:
#### Messages (TODOs)
| Route | Method | Description |
| ----------- | ----------- | ----------- |
|http://localhost:3000/messages |GET | Gets all messagess |
|http://localhost:3000/messages/{messageId} |GET | Get one message by id|
|http://localhost:3000/messages | POST | add a new message |
|http://localhost:3000/messages/{messageId}| PUT | update an exisiting message|
|http://localhost:3000/messages/{messageId} | DELETE | delete a message |{messageId} = Route parameter = `:messageId`
#### Users| Route | Method | Description |
| ----------- | ----------- | ----------- |
|http://localhost:3000/users/ | GET | get all users |
|http://localhost:3000/users/{userId} |GET | Get one user by id|
|http://localhost:3000/users | POST | add a new user to the database |
|http://localhost:3000/users/{userId}| PUT | update an exisiting user|
|http://localhost:3000/users/{userId} | DELETE | delete a user |{userId} = Route parameter = `:userId`