Sha256: 9d18a56d5e327b9dfc908c2af06813b0377b5f33e13df6dff498c62d7cb49ac6

Contents?: true

Size: 375 Bytes

Versions: 6

Compression:

Stored size: 375 Bytes

Contents

require 'carte/server'
require 'json'

$config = JSON.parse(File.read('config.json'))

class Carte::Server
  configure do
    Mongoid.load! './mongoid.yml'
    set :carte, $config
  end
end

map('/') do
  use Rack::Deflater
  use Rack::Static, urls: [""], root: $config['root_dir'], index: $config['html_path']
  run lambda {}
end

map('/api') do
  run Carte::Server.new
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
carte-server-1.0.9 config.ru
carte-server-1.0.8 config.ru
carte-server-1.0.7 config.ru
carte-server-1.0.6 config.ru
carte-server-1.0.5 config.ru
carte-server-1.0.4 config.ru