Question: Add a GET route for / that reads and returns index.html using the readFile ( ) fs function. Use an arrow function for the second
Add a GET route for that reads and returns index.html using the readFile fs function. Use an arrow function for the second parameter of readFile Use Node.js dirname variable to get the appropriate path for index.html Include the appropriate ContentType MIME header type. If no error occurs, also include a status code of If an error occurs, return a status code of
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
