Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce2c48b

Browse files
committed
upload
1 parent c849ac0 commit ce2c48b

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

index.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>build a server homework</title>
5+
</head>
6+
<body>
7+
<h1>Hi Hack Your Future</h1>
8+
</body>
9+
</html>
10+
11+
12+
13+
14+
switch (request.url){
15+
case '/':
16+
fs.readFile('www/index.html', 'utf8', ((error, data)=>{
17+
response.writeHead(200, {'Content-Type': 'text/html'});
18+
response.end(data);
19+
}));
20+
21+
22+
const fs = require('fs');

week1/homework/src/server.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,3 @@ module.exports = {
5555
};
5656

5757

58-
59-

0 commit comments

Comments
 (0)