Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var http = require('http');
- var fs = require('fs');
- var strftime = require('./strftime-min.js')
- var port = "8081";
- var path = "./tasks.json";
- var myServer = http.createServer(function (request, response) {
- var file = fs.createReadStream(path);
- file.pipe(response);
- });
- myServer.listen(port);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement