main.rb1062 chars49 lines
This code creates a TCP server that listens on port 3000. When a request is received, it is parsed and the corresponding action is taken. If the request is a GET request to the /path
route, a cookie is set and a response is sent back with a greeting that includes the user ID stored in the cookie, otherwise a 404 response is sent. The parse_cookie
method is used to convert the cookie string to a hash.
gistlibby LogSnag