Sha256: 1562a0ab8174a1aea02c41d98102124d5ef88a50eee212086e7a3b69549abb42

Contents?: true

Size: 671 Bytes

Versions: 1

Compression:

Stored size: 671 Bytes

Contents

# Feel free to rename from "MyApp" to anything
# if so, remember changing config.ru, config/boot.rb
class MyApp < Sinatra::Base
  set :root, File.expand_path("../../", __FILE__)
  set :views, File.join(root, "app/views")
  set :public_folder, File.join(root, "public")

  register Sinatra::RespondWith
  register Sinatra::Namespace

  helpers do
    include Sinatra::Streaming
    include Sinatra::ContentFor
    include Sinatra::JSON
  end

  configure :development do
    MyApp.reset!
    use Rack::Reloader
  end

  def self.setup
    %w!config lib app!.each do |dir|
      Dir.glob("#{root}/#{dir}/**/*.rb") do |file|
        require file
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hisyo-0.2.0 data/generators/project/app/app.rb