Skip to content

ccufc/task-solid-with-express

Repository files navigation

API documentation

URL

https://localhost:3000

User

GET URL

GET https://localhost:3000/user

Description

method description
GET returns all users in the database

Parameters

parameter description
No parameters

Response

code description media type
200 returned all users application/json
500 unable to return all users application/json

200

[
  {
    "id": 1,
    "name": "Jhon Doe",
    "email": "johndoe@example.com",
    "age": 20
  }
]

500

{
  "error": "failed to retrive users"
}

POST URL

POST https://localhost:3000/user

Description

method description
POST creates a user in the database

Parameters

parameter description
No parameters

Response

code description media type
201 creates a successful user text/html
500 user creation failed text/html

201

User created successfully

500

User creation failed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •