Sha256: 2fcb72907a1b51be926faddc1f6af038efa20395f8d118a2ecb6bd045929ee0e
Contents?: true
Size: 489 Bytes
Versions: 2
Compression:
Stored size: 489 Bytes
Contents
require 'sinatra/base' require 'puma' module Pokeplot class Web < Sinatra::Base include Database set :bind, '0.0.0.0' set :port, 5001 set :server, :puma set :traps, false set :static, true set :public_folder, __dir__ + "/web" def self.config(host = '0.0.0.0', port = 5001) @@db = Database.mongo set :bind, host set :port, port end get '/' do send_file File.join(settings.public_folder, 'index.html') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pokeplot-0.2.1beta | lib/pokeplot/web.rb |
pokeplot-0.2.0beta | lib/pokeplot/web.rb |