Sha256: 031613e14edb2bce91d5c6e0db43c6d572b07907e4294468e2f717ed653ff101
Contents?: true
Size: 578 Bytes
Versions: 2
Compression:
Stored size: 578 Bytes
Contents
require "rack" require "toycol" Toycol::Protocol.use(:PROTOCOL_NAME) class App def call(env) # Define your app on request method, request path, request query etc # For example: # case env["REQUEST_METHOD"] # when "GET" # [ # 200, # { "Content-Type" => "text/html" }, # ["Hello, This app is running by new protocol."] # ] # when "OTHER" # [ # 600, # { "Content-Type" => "text/html" }, # ["This is response message for additional request method"] # ] # end end end run App.new
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
toycol-1.0.0 | lib/toycol/templates/application.txt |
toycol-0.3.1 | lib/toycol/templates/application.txt |