BIG SWORD

基于rack的,微型web api开发框架。参考hobbitsinatra

A microframework for web api built on rack, reference to hobbit and sinatra.

安装Installation

在Gemfile中添加

Add this line to your application's Gemfile:

gem 'bigsword'

然后执行

And then execute:

$ bundle install

或者,你可以手动安装

Or install it yourself as:

$ gem install bigsword

使用Usage

Hello World example

新建一个app.rb文件

Create a file called app.rb:

require "bigsword"

get "/hello" do
    "hello bigsword!"
end

创建config.ru文件

Create a config.ru file:

require './app'
run Proc.new { |env| _call env }

执行

run:

$ rackup

打开浏览器,输入网址http://localhost:9292/hello

View your app at http://localhost:9292/hello.

License

See the LICENSE.