-
The web server is be created using only the native
HTTP module
. -
Accept requests for the
GET /projects/:id
endpoint, whereid
is the value passed in theURL
. If theid
value is not set or is empty in theURL
, the server responds back with thestatus
code400
and the JSON message{"message" : "BAD REQUEST"}
.
Live API
https://rio-health-stkl.vercel.app/projects/
- If the
id
is valid, filter the projects list based on theid
passed as input to the endpoint such that projectid
matched the input passed. The server sends a JSON response back with the filtered project data, along with thestatus
code200
.
Live API
https://rio-health-stkl.vercel.app/projects/[1-5]
- If the
id
is valid but no matching projects are found for theid
, the server responds with thestatus
code404
.
Live API
https://rio-health-stkl.vercel.app/projects/[6~...]
- If the request to the web server contains a route other than
/projects
, the server responds back with thestatus
code404
.
Live API
https://rio-health-stkl.vercel.app/[anything]
- The server is listening for requests on
port 8000
. External tools will not be able to be connected to anyport
other than8000
.