Added publish_route to www

This commit is contained in:
G. Gibson 2024-04-29 01:46:47 -07:00
parent ecc70bfc3a
commit fca03f29ee

View file

@ -57,6 +57,11 @@ www_paths.each_pair do |moniker, path|
end end
# ### Sinatra Bootstrap # ### Sinatra Bootstrap
class Node0 < Sinatra::Application class Node0 < Sinatra::Application
def self.publish_route(the_method, path, options={}, &block)
route(the_method.to_s.upcase, path, options) do
block.call(the_method,request,session)
end
end
enable :sessions enable :sessions
#use Rack::Session::Cookie, {:key => "rack.session", :expire_after => 318513600, :same_site => :strict, :secure => true} #use Rack::Session::Cookie, {:key => "rack.session", :expire_after => 318513600, :same_site => :strict, :secure => true}
# #