Python bottlepy 和 Ruby sinatra框架【原創】

Python bottlepy
站點:http://bottlepy.org/


from bottle import route, run

@route('/hello')
def hello():
    return "Hello World,PHPer.yang Python bottle"

run(host='74.82.175.214', port=8080, debug=True)

執行python t.py


由於沒有定義,定義了hello



Ruby sinatra
http://www.sinatrarb.com/
gem install sinatra



require 'sinatra'

get '/hi' do
  "Hello World! PHPer.yang Ruby sinatra"
end

ruby -rubygems hi.rb
相關文章
相關標籤/搜索