https://github.com/williamkoller/tarvos
Rest Api with Nestjs, Prisma, Docker and Jest
https://github.com/williamkoller/tarvos
docker docker-compose nestjs nodejs postgresql prisma rest-api
Last synced: 3 months ago
JSON representation
Rest Api with Nestjs, Prisma, Docker and Jest
- Host: GitHub
- URL: https://github.com/williamkoller/tarvos
- Owner: williamkoller
- Created: 2024-06-06T20:09:10.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-06T20:32:31.000Z (about 2 years ago)
- Last Synced: 2025-01-09T18:59:57.737Z (over 1 year ago)
- Topics: docker, docker-compose, nestjs, nodejs, postgresql, prisma, rest-api
- Language: TypeScript
- Homepage:
- Size: 133 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Tarvos
## User
- Add user
`method: POST`
```bash
http://localhost:3002/users
```
Body:
```json
{
"name": "John",
"surname": "Doe",
"age": 34,
"email": "johndoe@mail.com",
"password": "Q1w2e3r4t5y6u7i8o9"
}
```
Response:
```json
{
"id": 5,
"name": "John",
"surname": "Doe",
"age": 34,
"email": "johndoe@mail.com",
"password": "$2b$12$baVboKK4O9IqOOFvzaBS2OdI9GuxKecdG3dPnaVQanQKMEMJVVN0S",
"createdAt": "2024-06-06T20:07:08.847Z",
"updatedAt": "2024-06-06T20:07:08.847Z"
}
```
- Load all users with filters
With filter:
`method: GET`
```bash
http://localhost:3002/users?name=jo
```
Response:
```json
[
{
"id": 5,
"name": "John",
"surname": "Doe",
"age": 34,
"email": "johndoe@mail.com",
"password": "$2b$12$baVboKK4O9IqOOFvzaBS2OdI9GuxKecdG3dPnaVQanQKMEMJVVN0S",
"createdAt": "2024-06-06T20:07:08.847Z",
"updatedAt": "2024-06-06T20:07:08.847Z",
"posts": []
}
]
```
Without filter:
`method: GET`
```bash
http://localhost:3002/users
```
Response:
```json
[
{
"id": 1,
"name": "William",
"surname": "Koller",
"age": 34,
"email": "william.koller@icloud.com",
"password": "$2b$12$oU5pREvVt9nt3ilfuaTuuunz.YQVX3n7b5eaj7hy.HkcIef2KVWwS",
"createdAt": "2024-06-06T19:52:36.093Z",
"updatedAt": "2024-06-06T19:52:36.093Z",
"posts": []
},
{
"id": 4,
"name": "William",
"surname": "Koller 1",
"age": 34,
"email": "william.koller1@icloud.com",
"password": "$2b$12$NYpg9X2WWvE9SQxyXLyf2O6GkHMATt88wer9m2s1.ey3o/PH1ZdeW",
"createdAt": "2024-06-06T20:06:36.090Z",
"updatedAt": "2024-06-06T20:06:36.090Z",
"posts": []
},
{
"id": 5,
"name": "John",
"surname": "Doe",
"age": 34,
"email": "johndoe@mail.com",
"password": "$2b$12$baVboKK4O9IqOOFvzaBS2OdI9GuxKecdG3dPnaVQanQKMEMJVVN0S",
"createdAt": "2024-06-06T20:07:08.847Z",
"updatedAt": "2024-06-06T20:07:08.847Z",
"posts": []
}
]
```