struct Orion::Router

Overview

The Orion::Router is the workhorse that does the work when a request comes into your application. It will take all of your defined routes and builds you an application that can serve HTTP traffic. You can configure the router using the config in a single file router. Or by calling the .new or .start method within your app.

Defined in:

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(tree : DSL::Tree, autoclose : Bool = true) #

Class Method Detail

def self.start(tree : DSL::Tree, *, config : Config) #

def self.start(tree : DSL::Tree, *, autoclose : Bool = true, workers = nil, **bind_opts) #

Instance Method Detail

def bind(*args, **options) #

def bind(*args, **options, &) #

def call(*args, **options) #

def call(*args, **options, &) #

def handlers : Array(HTTP::Handler) #

def listen(*args, **options) #

def listen(*args, **options, &) #

def processor(*args, **options) #

def processor(*args, **options, &) #

def use(handler : HTTP::Handler) #

def use(handler) #

def visualize #

Visualize the route tree