Skip to content

Commit a76b368

Browse files
committed
update: --
1 parent 70a0ddc commit a76b368

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

http/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const http = require('http');
2+
3+
const hostname = '127.0.0.1';
4+
const port = 3000;
5+
6+
const server = http.createServer((req, res) => {
7+
res.statusCode = 200;
8+
res.setHeader('Content-Type', 'text/plain');
9+
res.end('Hello')
10+
});
11+
12+
server.listen(port, hostname, () => {
13+
console.log('启动')
14+
})

0 commit comments

Comments
 (0)