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:

orion/router.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

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

[View source]

Class Method Detail

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

[View source]
def self.start(tree : DSL::Tree, *, autoclose : Bool = true, strip_extension : Bool = false, workers = nil, **bind_opts) #

[View source]

Instance Method Detail

def bind(*args, **options) #

[View source]
def bind(*args, **options, &) #

[View source]
def call(*args, **options) #

[View source]
def call(*args, **options, &) #

[View source]
def handlers : Array(HTTP::Handler) #

[View source]
def listen(*args, **options) #

[View source]
def listen(*args, **options, &) #

[View source]
def processor(*args, **options) #

[View source]
def processor(*args, **options, &) #

[View source]
def use(handler : HTTP::Handler) #

[View source]
def use(handler) #

[View source]
def visualize #

Visualize the route tree


[View source]