Skip to content

Commit d8e9bb5

Browse files
committed
Added OS info
1 parent faaa590 commit d8e9bb5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11

22
const
3-
http = require("http");
3+
http = require("http"),
4+
os = require("os");
45

56
const server = http.createServer((request, response) => {
67
response.writeHead(200, {"Content-Type": "text/plain"});
7-
response.end("Hello World!");
8+
response.end(`Hello World! Machine: ${os.hostname()}, Type: ${os.type()}`);
89
});
910

1011
const port = process.env.PORT || 1337;

0 commit comments

Comments
 (0)