-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathserver.rb
More file actions
29 lines (26 loc) · 793 Bytes
/
server.rb
File metadata and controls
29 lines (26 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require 'rubygems'
require 'bundler/setup'
require 'goliath'
require 'grape'
require 'em-synchrony/activerecord'
require 'activerecord-postgis-adapter'
require 'rgeo'
require 'rgeo-activerecord'
require 'rgeo-geojson'
require 'yaml'
require 'erb'
require File.expand_path(File.join(File.dirname(__FILE__), '.', 'config', 'application'))
require File.expand_path(File.join(File.dirname(__FILE__), '.', 'app', 'rack'))
require File.expand_path(File.join(File.dirname(__FILE__), '.', 'app', 'model'))
require File.expand_path(File.join(File.dirname(__FILE__), '.', 'app', 'api'))
module Compass
class Server < Goliath::API
@api = nil
def initialize()
@api = Compass::API::Factory.create_api(API_CONFIG, "1")
end
def response(env)
@api.call(env)
end
end
end