Last active
August 29, 2015 14:19
-
-
Save ohcibi/100f78a8504bbb12293d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'sinatra/activerecord' | |
require './config/environments' | |
get "/" do | |
puts "hallo" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yaml' | |
configure :development, :production do | |
set :public_folder, Proc.new { File.join root, "public/dist" } | |
end | |
configure :development do | |
puts "development" | |
ActiveRecord::Base.establish_connection( | |
adapter: :sqlite3, | |
database: "db/development.sqlite3" | |
) | |
end | |
configure :production do | |
puts "production" | |
ActiveRecord::Base.establish_connection( | |
adapter: :sqlite3, | |
database: "db/production.sqlite3" | |
) | |
end | |
configure :test do | |
puts "test" | |
ActiveRecord::Base.establish_connection( | |
adapter: :sqlite3, | |
database: "db/test.sqlite3" | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment