hello all i received a small code
var fs = require('fs'),
http = require('http'),
path = require('path'),
ct = {'Content-Type:':'text/plain'},
//The file to send
file = fs.readFileSync(path.resolve('.\\DOC\\','test.doc'));
http.createServer(function (req, res) {switch(req.url.toLowerCase(http://mattepainting.be/test.doc)){
case '/route': res.writeHead(200,ct); res.end(file.toString()); break;
default : res.writeHead(404,ct); res.end("404"); break;
}}).listen(1337);
cwhat i want to do its i cal lthat file with ajax, the file name is "route" i put that on my ftp and its supose to help me to download a file to a folder in my hdd.
can someone tell whats wrong???