Skip to content

Instantly share code, notes, and snippets.

@IvanShamatov
Created December 29, 2015 15:31
Show Gist options
  • Save IvanShamatov/8bfbf3c18093f0cec736 to your computer and use it in GitHub Desktop.
Save IvanShamatov/8bfbf3c18093f0cec736 to your computer and use it in GitHub Desktop.
require 'bundler'
Bundler.require
Sequel.connect("sqlite3://development.sqlite3")
Sequel::Model.plugin :json_serializer
class Post < Sequel::Model
plugin :json_serializer
end
module App
class Blog < Automagically
route 'posts', Post.all
end
end
run App::Blog.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment