Class: Artserve

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/artserve/service.rb,
lib/artserve.rb

Overview

todo/check: find a better name?

Class Method Summary collapse

Class Method Details

.mainObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/artserve.rb', line 14

def self.main
   puts 'hello from main'

#####
# fix/todo:
##   use differnt port ??
##
##  use --local  for host e.g. 127.0.0.1  insteaod of 0.0.0.0 ???

 #   puts 'before Puma.run app'
 #   require 'rack/handler/puma'
 #   Rack::Handler::Puma.run ProfilepicService, :Port => 3000, :Host => '0.0.0.0'
 #   puts 'after Puma.run app'

 # use webrick for now - why? why not?
   puts 'before WEBrick.run service'
   Rack::Handler::WEBrick.run Artserve, :Port => 3000, :Host => '127.0.0.1'
   puts 'after WEBrick.run service'

  puts 'bye'
end