function index (response){
   console.log("Request handler for index was called.")
  
   // Reading the index.html file and attaching the content to the response
   fs.readFile("./Public/index.html",function(error, data){
       if (error){
           console.log(err); 
       }
       response.writeHead(200, {"Content-type": "text/html"});
       response.write(data);
       response.end();
   })
   }
// function for handling the business logic for index.html
function for handling the business logic for index.html
function for handling the business logic for index . html
function index (response){
   console.log("Request handler for index was called.")
   fs.readFile("./Public/index.html",function(error, data){
       if (error){
           console.log(err); 
       }
       response.writeHead(200, {"Content-type": "text/html"});
       response.write(data);
       response.end();
   })
   }
function index ( response ) { console . log ( "Request handler for index was called." ) fs . readFile ( "./Public/index.html" , function ( error , data ) { if ( error ) { console . log ( err ) ; } response . writeHead ( 200 , { "Content-type" : "text/html" } ) ; response . write ( data ) ; response . end ( ) ; } ) }
function for handling the business logic for index.html
function for handling the business logic for index . html
// Reading the index.html file and attaching the content to the response