These are examples with Node and Ruby for try to make a (very) basic HTTP server to return responses for the HTTP/1.1 protocol version.
$ node -v
v10.16.0
$ ruby -v
ruby 2.6.3p62$ node node/index.js$ ruby ruby/server.rb-
Web Browser
-
Telnet CLI
$ telnet localhost 3000 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'.Type in:
GET / HTTP/1.1Return:
HTTP/1.1 200 OK <h1>Hola Mundo</h1>Connection closed by foreign host.