Module: Saya
- Defined in:
- lib/saya/api.rb,
lib/saya/version.rb
Defined Under Namespace
Modules: Runner
Classes: API
Constant Summary
collapse
- VERSION =
'0.0.1'
- Root =
File.expand_path("#{__dir__}/..")
- Auth =
"#{Saya::Root}/config/auth.yaml"
- Config =
"#{Saya::Root}/config.ru"
- Server =
Rack::Builder.app do
use Rack::ContentLength
use Rack::ContentType
use Rack::Session::Pool
use Rack::Config do |env|
env['PATH_INFO'] = '/index.html' if env['PATH_INFO'] == '/'
end
map '/api' do run Saya::API.new end
map '/' do run Rack::File.new("#{Saya::Root}/public") end
end