You have been tasked with creating a simple REST API server to help with a monitoring effort. The main purpose of the server is to return information about a website's performance. Details of the three endpoints that this server should have are below.
NOTE you may use any programming language of your choice
response: json response with current time. see below
{
"pong": "2021-04-16 10:24:23.118556"
}
response: json response with some server info. see below
{
"hostname": "interview-1", // this is the hostname of the server
"uptime": "up 1 minute", // this is the server's uptime
"load_average": [ 0.18, 0.14, 0.05 ] // this is the cpu load average of the server
}
response: json response with some information about the endpoint
{
"url": "http://date.jsontest.com", // this is the URL provided in the request path
"status_code": 200, // this is the response code from the url
"date_header": "Wed, 13 Apr 2022 12:49:34 GMT", // this is the "Date" header from the http response
"processing_time_ms": 400 // this is the amount of time in ms it took complete this request
}