Skip to content

Commit ad5a163

Browse files
committed
Commit 2
1 parent e920a41 commit ad5a163

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
var http = require("http");
2+
var fs = require("fs");
3+
4+
http.createServer(function(request,response){
5+
6+
// response.writeHead(200,{'Content-Type':'text/plain'});
7+
// response.end();
8+
9+
fs.readFile('new.txt',function(err,data){
10+
if(err){
11+
console.error(err);
12+
return;
13+
}
14+
console.log(data.toString());
15+
});
16+
17+
}).listen(1234);
18+
19+
console.log("Server at localhost:1234");

0 commit comments

Comments
 (0)