class Grip::Application

Overview

Grip::Application is a building class which initializes the crucial parts of the web-framework.

Included Modules

Defined in:

grip/application.cr

Constant Summary

DEFAULT_ENVIRONMENT = "development"
DEFAULT_HOST = "0.0.0.0"
DEFAULT_PORT = 4004
DEFAULT_REUSE_PORT = false

Constructors

Instance Method Summary

Macros inherited from module Grip::Macros::Dsl

delete(route, resource, **kwargs) delete, exception(exception, resource) exception, exceptions(exceptions, resource) exceptions, forward(route, resource, **kwargs) forward, get(route, resource, **kwargs) get, head(route, resource, **kwargs) head, options(route, resource, **kwargs) options, patch(route, resource, **kwargs) patch, pipe_through(valve) pipe_through, pipeline(name, pipes) pipeline, post(route, resource, **kwargs) post, put(route, resource, **kwargs) put, scope(path) scope, ws(route, resource, **kwargs) ws

Constructor Detail

def self.new(environment : String = DEFAULT_ENVIRONMENT, host : String = DEFAULT_HOST, port : Int32 = DEFAULT_PORT, reuse_port : Bool = DEFAULT_REUSE_PORT, handlers : Array(HTTP::Handler) = [] of HTTP::Handler) #

[View source]

Instance Method Detail

def cert_file : String #

[View source]
def environment : String #

[View source]
def environment=(environment : String) #

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

[View source]
def host : String #

[View source]
def host=(host : String) #

[View source]
def key_file : String #

SSL/TLS configuration


[View source]
def port : Int32 #

[View source]
def port=(port : Int32) #

[View source]
def reuse_port=(reuse_port : Bool) #

[View source]
def reuse_port? : Bool #

[View source]
def run #

[View source]
def scheme : String #

[View source]
def scopes : Array(String) #

[View source]
def server : HTTP::Server #

Server setup and running


[View source]
def ssl : Bool #

[View source]
def valve : Symbol | Nil #

[View source]
def valves : Array(Symbol) #

[View source]