Sha256: 3d9547b5959594e0986b024b896c7c7a81abd9863b6299b22c25f22016e0f3fa

Contents?: true

Size: 405 Bytes

Versions: 10

Compression:

Stored size: 405 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 Rack::Directory.new $config['root_dir']
end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
carte-server-1.0.3 config.ru
carte-server-1.0.2 config.ru
carte-server-1.0.1 config.ru
carte-server-1.0.0 config.ru
carte-server-0.0.28 config.ru
carte-server-0.0.27 config.ru
carte-server-0.0.26 config.ru
carte-server-0.0.25 config.ru
carte-server-0.0.24 config.ru
carte-server-0.0.23 config.ru