Skip to content

Instantly share code, notes, and snippets.

@gyosit
Last active March 25, 2018 09:27
Show Gist options
  • Save gyosit/668baa3e1047136a73099c45f62f7406 to your computer and use it in GitHub Desktop.
Save gyosit/668baa3e1047136a73099c45f62f7406 to your computer and use it in GitHub Desktop.
require 'sinatra'
require 'bundler/setup'
require 'json'
require 'line/bot'
ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'] || 'sqlite3://localhost/appdb')
class User < ActiveRecord::Base; end
def client
@client ||= LINE::Bot::Client.new { |config|
config.channel_secret = ENV['SECRET']
config.channel_token = ENV['TOKEN']
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment