main.rb439 chars22 lines
The above code creates a HTTP server on port 8080
. When a client makes a request to this server, it responds with a "Hello World!" message. You can change the response to whatever you want. Note that this is a very basic example and should not be used in production, as it does not handle errors or other requests besides the initial GET
request.
gistlibby LogSnag