Skip to content

Instantly share code, notes, and snippets.

@lushiyun
Created June 21, 2020 00:08
Show Gist options
  • Save lushiyun/9fb3a566a1cc46d27754587a16dce863 to your computer and use it in GitHub Desktop.
Save lushiyun/9fb3a566a1cc46d27754587a16dce863 to your computer and use it in GitHub Desktop.
class ApplicationController < Sinatra::Base
register Sinatra::ActiveRecordExtension
use Rack::Flash
configure do
enable :sessions
set :session_secret, "#{ENV['SESSION_SECRET']}"
set :public_folder, Proc.new { File.join(root, "public") }
set :views, 'app/views'
end
... ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment