/sin

Sinatra project template

Primary LanguageRubyMIT LicenseMIT

Sin

Sinatra project template.

Components

Add new routes

routes/example.rb

module Sin
  module Routes
    class Example < Base  # Inherits from Sin::Routes::Base
      get '/example'
        "example"
      end
    end
  end
end

app.rb

module Sin
  class App < Sinatra::Base
    #...

    require_relative 'routes/example'

    use Routes::Example

    # ...
  end
end