Module: Twenty::Servlet::ServerMixin
- Included in:
- Twenty::Servlet
- Defined in:
- lib/twenty-backend/servlet/mixin/server_mixin.rb
Instance Method Summary collapse
-
#server(options = {}) ⇒ WEBrick::HTTPServer
Returns an instance of WEBrick::HTTPServer.
-
#server_options ⇒ Hash<Symbol, String>
The default server options given to WEBrick::HTTPServer.new.
Instance Method Details
#server(options = {}) ⇒ WEBrick::HTTPServer
Returns an instance of WEBrick::HTTPServer.
11 12 13 14 15 |
# File 'lib/twenty-backend/servlet/mixin/server_mixin.rb', line 11 def server( = {}) server = WEBrick::HTTPServer.new .merge() server.mount "/graphql", Twenty::Servlet::GraphQL server end |
#server_options ⇒ Hash<Symbol, String>
Returns The default server options given to WEBrick::HTTPServer.new.
20 21 22 23 24 25 26 |
# File 'lib/twenty-backend/servlet/mixin/server_mixin.rb', line 20 def { DocumentRoot: Twenty.build, BindAddress: "127.0.0.1", Port: 2020 } end |