https://github.com/acebot712/realtime-chat-app-backend
https://github.com/acebot712/realtime-chat-app-backend
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/acebot712/realtime-chat-app-backend
- Owner: acebot712
- Created: 2024-07-19T11:33:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-19T12:02:08.000Z (almost 2 years ago)
- Last Synced: 2024-07-19T14:49:14.447Z (almost 2 years ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Test Your Endpoints
You can test your endpoints using a tool like Postman or cURL. Here are some example commands using cURL:
1. **Create a new user**:
```bash
curl -X POST http://localhost:3000/users -H "Content-Type: application/json" -d '{"email": "bob@prisma.io", "name": "Bob"}'
```
2. **Get all users**:
```bash
curl http://localhost:3000/users
```
3. **Get a single user by ID**:
```bash
curl http://localhost:3000/users/1
```
4. **Update a user by ID**:
```bash
curl -X PUT http://localhost:3000/users/1 -H "Content-Type: application/json" -d '{"email": "alice@prisma.io", "name": "Alice Updated"}'
```
5. **Delete a user by ID**:
```bash
curl -X DELETE http://localhost:3000/users/1
```