Skip to content

Commit 8f5980a

Browse files
committed
Machine Info
1 parent bbc7e0c commit 8f5980a

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! Machine");
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)