Node.js - HTTP Module
You want to manually route requests to serve static files like '/index.html' or '/style.css'. Which approach correctly reads and serves these files using Node.js core modules?
fs module's readFile method reads files from disk asynchronously.res.write() and res.end().fs.readFile to read the file and send its content in the response -> Option C15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions