(version Crystal avec Amber framework) Gérer sa collection de jeux vidéos, consoles et figurines. Et plus si affinités.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
1.1 KiB

Amber::Server.configure do
pipeline :web do
# Plug is the method to use connect a pipe (middleware)
# A plug accepts an instance of HTTP::Handler
plug Amber::Pipe::PoweredByAmber.new
# plug Amber::Pipe::ClientIp.new(["X-Forwarded-For"])
plug Citrine::I18n::Handler.new
plug Amber::Pipe::Error.new
plug Amber::Pipe::Logger.new
plug Amber::Pipe::Session.new
plug Amber::Pipe::Flash.new
plug Amber::Pipe::CSRF.new
end
pipeline :api do
plug Amber::Pipe::PoweredByAmber.new
plug Amber::Pipe::Error.new
plug Amber::Pipe::Logger.new
plug Amber::Pipe::Session.new
plug Amber::Pipe::CORS.new
end
# All static content will run these transformations
pipeline :static do
plug Amber::Pipe::PoweredByAmber.new
plug Amber::Pipe::Error.new
plug Amber::Pipe::Static.new("./public")
end
routes :web do
get "/", HomeController, :index
end
routes :api do
end
routes :static do
# Each route is defined as follow
# verb resource : String, controller : Symbol, action : Symbol
get "/*", Amber::Controller::Static, :index
end
end