Answer the question
In order to leave comments, you need to log in
What in node is responsible for loading css and script?
What is responsible for loading styles and scripts in Node?
Do I need to write another response with a command after fs (file)?
var http = require("http");
var fs = require("fs");
http.createServer(function(request, response) {
fs.readFile("index.html", {encoding: "utf-8"}, function(error, file) {
response.writeHead(200, {"Content-type" : "text/html"});
response.write(file);
response.end();
});
}).listen(8000);
console.log('Server running on port 8000');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question