require 'sinatra'
require 'sinatra/reloader'

configure do
  set :public_folder, File.dirname(__FILE__) + '/json'
end

get '/:name' do
  content_type 'application/json'
  if params[:name].nil? then 
    File.readlines(params[:name])
  else
    "File not found"
  end
end

require 'sinatra'
require 'sinatra/reloader'

configure do
  set :public_folder, File.dirname(__FILE__) + '/json'
end

get '/:name' do
  content_type 'application/json'
  if params[:name].nil? then 
    File.readlines(params[:name])
  else
  	status 400
  end
end

Return 404 if the request file is not there
Return 404 if the request file is not there
