Skip to content

Routing

alias ART

Convenience alias to make referencing Athena::Routing types easier.

Alias definition

Athena::Routing

Constants

Log = ::Log.for("athena.routing")

module Athena::Routing

See the external documentation for an introduction to Athena.

Also checkout the Components for an overview of how Athena is designed.

Constants

Log = ::Log.for("athena.routing")

Class methods

.run(port : Int32 = 3000, host : String = "0.0.0.0", reuse_port : Bool = false) : Nil

Runs an HTTP::Server listening on the given port and host.

require "athena"

class ExampleController < ART::Controller
  @[ARTA::Get("/")]
  def root : String
    "At the index"
  end
end

ART.run
See ART::Controller for more information on defining controllers/route actions.