Add docs
This commit is contained in:
parent
09d82ed74b
commit
b5ff93c677
3 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,6 @@
|
|||
# Kemal DSL is defined here and it's baked into global scope.
|
||||
# The DSL currently consists of HTTP verbs(get post put patch delete options),
|
||||
# WebSocket(ws) and custom error handler(error).
|
||||
HTTP_METHODS = %w(get post put patch delete options)
|
||||
|
||||
{% for method in HTTP_METHODS %}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
# Kemal::StaticFileHandler is used to serve static files(.js/.css/.png e.g).
|
||||
# This handler is on by default and you can disable it like.
|
||||
#
|
||||
# serve_static false
|
||||
#
|
||||
class Kemal::StaticFileHandler < HTTP::StaticFileHandler
|
||||
def call(context)
|
||||
return call_next(context) if context.request.path.not_nil! == "/"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# This file contains the built-in view templates that Kemal uses.
|
||||
# Currently it contains templates for 404 and 500 error codes.
|
||||
|
||||
# Template for 404 Not Found
|
||||
def render_404
|
||||
template = <<-HTML
|
||||
|
|
Loading…
Reference in a new issue