Skip to content

Commit 4347aaf

Browse files
authored
add: experiment nodejs (#4)
1 parent 116586f commit 4347aaf

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

experiment/app.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const http = require("http");
2+
3+
const hostname = "localhost";
4+
const port = 9023;
5+
6+
const server = http.createServer((req, res) => {
7+
res.statusCode = 200;
8+
res.setHeader("Content-Type", "text/plain");
9+
res.end("Hello World");
10+
});
11+
12+
server.listen(port, hostname, () => {
13+
console.log(`Server running at http://${hostname}:${port}`);
14+
});

0 commit comments

Comments
 (0)