https://localhost:3000
GET https://localhost:3000/user
method | description |
---|---|
GET |
returns all users in the database |
parameter | description |
---|---|
No parameters |
code | description | media type |
---|---|---|
200 |
returned all users | application/json |
500 |
unable to return all users | application/json |
[
{
"id": 1,
"name": "Jhon Doe",
"email": "johndoe@example.com",
"age": 20
}
]
{
"error": "failed to retrive users"
}
POST https://localhost:3000/user
method | description |
---|---|
POST |
creates a user in the database |
parameter | description |
---|---|
No parameters |
code | description | media type |
---|---|---|
201 |
creates a successful user | text/html |
500 |
user creation failed | text/html |
User created successfully
User creation failed