rails check
Ruby
code posted
by
Me
created at 28 Sep 23:16, updated at 03 Oct 05:30
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 |
require 'rubygems' require 'sinatra' require 'mongo' require 'json' connection = Mongo::Connection.new database = connection['agile_data'] collection = database['emails'] get '/email/:message_id' do |message_id| data = collection.find_one({:message_id => message_id}) JSON.generate(data) end |
311 Bytes in 2 ms with coderay