Class: RazorRisk::Cassini::Applications::UnsecuredMicroservice
- Inherits:
-
Microservice
- Object
- Sinatra::Base
- Microservice
- RazorRisk::Cassini::Applications::UnsecuredMicroservice
- Defined in:
- lib/razor_risk/cassini/applications/unsecured_microservice.rb
Class Method Summary collapse
-
.init_service(host: to_nil(host_not_given_ = true), port: to_nil(port_not_given_ = true), **options) ⇒ Object
This must be invoked prior to activation of the application.
Methods inherited from Microservice
define_catch_all_handlers, full_description, init_base_service, run!
Class Method Details
.init_service(host: to_nil(host_not_given_ = true), port: to_nil(port_not_given_ = true), **options) ⇒ Object
This must be invoked prior to activation of the application
Signature
-
Parameters:
- -
host [String] The host to which the application binds. May be:
nil, in which case no binding is performed and the Sinatra defaults are observed; +'0.0.0.0', in which case the server will listen on all available interfaces; a specific IP addres, in which case the server will listen only on that address. It is recommend that a specific address is used. Required- -
port [Integer] The port on which to activate. Required
- -
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/razor_risk/cassini/applications/unsecured_microservice.rb', line 49 def self.init_service \ host: to_nil(host_not_given_ = true), port: to_nil(port_not_given_ = true), ** trace ParamNames[:host, :port, ], host, port raise ArgumentError, 'missing keyword: host' if host_not_given_ check_parameter host, 'host', type: ::String, allow_nil: true raise ArgumentError, 'missing keyword: port' if port_not_given_ check_parameter port, 'port', type: Integer init_service_ \ # invoke superclass init_base_service host: host, port: port, ** end |