Skip to content

Commit 366e8ec

Browse files
save file
1 parent 341b2f2 commit 366e8ec

File tree

1 file changed

+7
-0
lines changed
  • blog/25-07-25/http-streaming-download/ex

1 file changed

+7
-0
lines changed

blog/25-07-25/http-streaming-download/ex/server.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66

77
function request(req,res){
88

9+
if(req.url=='/index.html'){
10+
res.writeHead(200,{'content-type':'text/html'});
11+
res.end(fs.readFileSync('index.html','utf'));
12+
return;
13+
}
14+
15+
916
var c = 0;
1017
fn();
1118

0 commit comments

Comments
 (0)