Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var http = require('http'),
- fs = require('fs');
- http.createServer(function (req, res) {
- fs.readFile("./" + req.url ,function(err, data){
- if (!err)
- res.writeHead(200);
- else
- res.writeHead(404);
- res.end(data);
- })
- }).listen(8124, "127.0.0.1");
Add Comment
Please, Sign In to add comment