xianbao commited on
Commit
ec321f6
·
verified ·
1 Parent(s): 4bfdc75

Update index.mjs

Browse files
Files changed (1) hide show
  1. index.mjs +14 -1
index.mjs CHANGED
@@ -1 +1,14 @@
1
- test
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import http from 'http';
2
+
3
+ const hostname = '0.0.0.0';
4
+ const port = 7860;
5
+
6
+ const server = http.createServer((req, res) => {
7
+ res.statusCode = 200;
8
+ res.setHeader('Content-Type', 'text/plain');
9
+ res.end('<html>Hello, World!\n</html>');
10
+ });
11
+
12
+ server.listen(port, hostname, () => {
13
+ console.log(`Server running at http://${hostname}:${port}/`);
14
+ });