Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (18 sloc) 560 Bytes
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..","gem","lib"))) # for local development
require 'rubygems'
require 'sinatra'
require "sinatra/jsonp"
require "json"
require "culturegrid"
set :public, File.dirname(__FILE__)
get '/' do
send_file 'index.html'
get '/search' do
response.headers['Cache-Control'] = "public, max-age=#{60 * 60 * 24}"
content_type :json
query = params[:q]
opts = params.delete_if{|k,v| k.to_s == "q" }
puts "query: #{query}, params: #{params.inspect}"
jsonp, params)
Jump to Line
Something went wrong with that request. Please try again.