Class: Statements::Cli

Inherits:
Object
  • Object
show all
Defined in:
lib/statements/cli.rb

Class Method Summary collapse

Class Method Details

.main(pwd, argv) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/statements/cli.rb', line 6

def self.main(pwd, argv)
  Statements::Database.new "#{pwd}/statements.sqlite3"
  Statements::Reader.read_dir pwd
  Thin::Server.start '0.0.0.0', 57473 do
    map('/q') { run Server.new }
    use Rack::Static, urls: [''], root: "#{ROOT}/lib/html", index: 'index.html'
    run Server
  end
end