class Tourmaline::Server

Overview

The Server class is a basic webhook server for receiving updates from the Telegram API.

Defined in:

tourmaline/server.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Tourmaline::Client) #

[View source]

Instance Method Detail

def serve(host = "127.0.0.1", port = 8081, ssl_certificate_path = nil, ssl_key_path = nil, no_middleware_check = false, &block : HTTP::Server::Context -> ) #

Start an HTTP server at the specified host and port that listens for updates using Telegram's webhooks.


[View source]
def serve(path = "/", host = "127.0.0.1", port = 8081, ssl_certificate_path = nil, ssl_key_path = nil, no_middleware_check = false) #

Start an HTTP server at the specified host and port that listens for updates using Telegram's webhooks.


[View source]
def stop_serving #

Stops the webhook HTTP server


[View source]