Why does not appear Katinka?

In General, father-in templates. And took them to my server IO.js. Long suffered with the MIME types, but when I saw that all was right, I realized that they do not matter.
The amazing thing is that if I open not using local server, then everything is OK.
Code
var http = require('http'),
 fs = require('fs'),
 typer = require('./typer.js');

http.createServer(function (request, response) {
console.log(request.url);
 if(request.url == '/'){
 request.url = 'chablone1.html';
 } else {
 request.url = '.' + request.url;
}
 var options = {
 'Content-Type': typer.type(request.url)
}
 response.writeHead(200, options);
 function data(chunk){
response.write(chunk.toString());
}
 function end(){
response.end();
}
 var file = fs.createReadStream(request.url);
 file.on('data', data);
 file.on('end', end);
}).listen(80);
July 9th 19 at 11:08
1 answer
July 9th 19 at 11:10
Tostring
The bcm? - blake_Eichma commented on July 9th 19 at 11:13
What makes ToString? Your understanding of this code. - mercedes commented on July 9th 19 at 11:16
: EEH... chunk is a buffer - blake_Eichma commented on July 9th 19 at 11:19
: here - mercedes commented on July 9th 19 at 11:22
: what? Buffer directly to send? - blake_Eichma commented on July 9th 19 at 11:25
Probably, Yes
https://nodejs.org/api/http.html#http_request_writ... - mercedes commented on July 9th 19 at 11:28
: well I for testing was easier in string to convert - blake_Eichma commented on July 9th 19 at 11:31

Find more questions by tags Node.js