Sha256: f5084a86df0106194b23aab67af2dca1ee6f2a1eba7f556b6417b751235d788d

Contents?: true

Size: 546 Bytes

Versions: 4

Compression:

Stored size: 546 Bytes

Contents

require 'rubygems'
require 'capcode'
$:.unshift( "../lib" )
require 'capcode/render/static'

module Capcode
  class Index < Route '/'
    def get
      render :static => "index.html"
    end
  end  
  class Path < Route '/path'
    def get
      render :static => "index.html", :exact_path => false
    end
  end  
end

## WARNING : when using rackup, :root default is the rackup directory (eg. /usr/bin or something like that) !
run Capcode.application( :static => "static", :verbose => true, :root => File.expand_path(File.dirname(__FILE__)) )

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
capcode-render-static-0.4.0 examples/render-static.ru
capcode-render-static-0.3.0 examples/render-static.ru
capcode-render-static-0.2.0 examples/render-static.ru
capcode-render-static-0.1.0 examples/render-static.ru