Sinatra - a DSL for quickly creating web applications in Ruby, Similar to web.py

Thursday, March 25, 2010

Sinatra on Github :
http://github.com/sinatra/sinatra

今天在github上看到Sinatra这样一个轻量级ruby web框架, 和web.py很相似

Install:

sudo gem install sinatra

Hello World:

# code.rb

require 'rubygems' 
require 'sinatra'

get '/' do 
    "Hello World!"
end

Run:

ruby code.rb

View at:http://localhost:4567

This entry was tagged Ruby, sinatra and web.py

comments powered by Disqus

© 2009-2013 lxneng.com. All rights reserved. Powered by Pyramid

go to Top