require 'sinatra/base' require 'tilt/erubis' require 'json' require_relative '<%= @gen.wormname %>/racks' require_relative '<%= @gen.wormname %>/helpers' module <%= @gen.camelname %> class App < Sinatra::Base helpers do include <%= @gen.camelname %>::Helpers end get '/' do headers 'Vary' => 'Accept' respond_to do |wants| wants.html do @content = '

Hello from <%= @gen.camelname %>

' @title = '<%= @gen.camelname %>' erb :index, layout: :default end wants.json do { app: '<%= @gen.camelname %>' }.to_json end end end # start the server if ruby file executed directly run! if app_file == $0 end end