contact.rb 393B

123456789101112131415161718192021
  1. require 'rubygems'
  2. require 'sinatra/base'
  3. configure {
  4. set :server, :puma
  5. }
  6. set :public_folder, 'public'
  7. class Contact < Sinatra::Base
  8. get '/' do
  9. File.read(File.join('public', 'index.html'))
  10. # if Sinatra::Base.environment == :production
  11. # File.read(File.join('public', 'index.html'))
  12. # else
  13. # 'This is not production'
  14. # end
  15. end
  16. run! if app_file == $0
  17. end