Sha256: 0de1807a497557f461051d85c673803c90561b9c41e276caa0b8746de0b782ee
Contents?: true
Size: 383 Bytes
Versions: 2
Compression:
Stored size: 383 Bytes
Contents
require 'sinatra' require 'sinatra/json' require 'mongo' module Nightwatch class Server < Sinatra::Application set :run, false set :server, 'thin' mongo = Mongo::MongoClient.new exceptions = mongo['nightwatch']['exceptions'] get '/' do erb :index end get '/exceptions' do json exceptions.find.to_a end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nightwatch-0.0.2 | lib/nightwatch/web/server.rb |
nightwatch-0.0.1 | lib/nightwatch/web/server.rb |