Sha256: 130542ea6bac5266816b149a79c82339cc369d4e37da20076b6f5a0b5dbcccff
Contents?: true
Size: 427 Bytes
Versions: 1
Compression:
Stored size: 427 Bytes
Contents
require "rubygems" require "sinatra/base" class MyAPP < Sinatra::Base get '/' do $caichen.hello! end get '/hi' do "hi" end get /.+/ do # params.inspect response['Content-Type'] = "application/x-json" env["REQUEST_PATH"].scan(/(\w+)/).join('_') end get '/url/*' do env.inspect end get '/*/*/*/*' do params.inspect end end MyAPP.run! :host => '0.0.0.0', :port => 12345
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lpmp-1.0.0 | test/sinatra.rb |