From e4a3cfdc99a7526e8b946662806a889d8c90dc7a Mon Sep 17 00:00:00 2001 From: HenryHo6688 <48022423+HenryHo6688@users.noreply.github.com> Date: Fri, 18 Oct 2019 14:49:42 -0400 Subject: [PATCH] 16 16 --- helloworld.js | 5 +++++ http_server.js | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 helloworld.js create mode 100644 http_server.js diff --git a/helloworld.js b/helloworld.js new file mode 100644 index 0000000..527990d --- /dev/null +++ b/helloworld.js @@ -0,0 +1,5 @@ +function hw() { + console.log('Hello World!'); +} + +hw(); \ No newline at end of file diff --git a/http_server.js b/http_server.js new file mode 100644 index 0000000..b8f2934 --- /dev/null +++ b/http_server.js @@ -0,0 +1,8 @@ +var http = require('http'); + +http.createServer(function (req, res) { + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.end('Hello RHEL 8!\n'); +}).listen(3002, "127.0.0.1"); + +console.log('Server running at http://127.0.0.1:3002/'); \ No newline at end of file