Sha256: e8450284bf718e76bd756c1d3f15eb5de59fddaee08f3840f3ad8d4fbd47f2db

Contents?: true

Size: 515 Bytes

Versions: 1

Compression:

Stored size: 515 Bytes

Contents

require 'saya/api'
require 'rack'

Saya::Root   = File.expand_path("#{__dir__}/..")
Saya::Auth   = "#{Saya::Root}/config/auth.yaml"
Saya::Config = "#{Saya::Root}/config.ru"
Saya::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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
saya-0.0.1 lib/saya.rb