Advertisement
desdemona

serwer

Dec 17th, 2014
627
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var http = require('http');
  2. var fs = require('fs');
  3. var strftime = require('./strftime-min.js')
  4.  
  5. var port = "8081";
  6. var path = "./tasks.json";
  7.  
  8. var myServer = http.createServer(function (request, response) {
  9.     var file = fs.createReadStream(path);
  10.     file.pipe(response);
  11. });
  12.  
  13. myServer.listen(port);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement