does anyone know how the index.js file should be implemented as I already got get.html and post.html?
Any GET request should be responded with the contents of the get.html file. Any POST request should be responded with the contents of the post.html file. Any other request should be responded with a status code 405 and the response should also have a header: Allow: GET, POST Every GET and POST response should also have Content-Type: text/html and status code 200.
'''
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GET Request</title>
</head>
<body>
<h1>Received a GET Request</h1>
</body>
</html>
'''
'''
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>POST Request</title>
</head>
<body>
<h1>Received a POST Request</h1>
</body>
</html>
'''