Skip to content

opa-oz/tree-sitter-caddy

Repository files navigation

tree-sitter-caddy

Functionality

  • Global options
    • Option name
    • Option value
    • Block options
  • Server
    • Protocol, domain, port in any order
    • Multiple addresses
    • No need for {} when only one server
    • Environment variables in address ex. {$DOMAIN:localhost}
  • Tokens and quotes
    • directive "simple string"
    • directive ""simple string""
    • directive ""simple string""
    • directive "quoted string"
    • directive "miltiline string"
    • Heredocs
      example.com {
          respond <<HTML
              <html>
                <head><title>Foo</title></head>
                <body>Foo</body>
              </html>
              HTML 200
      }
      
  • Matchers
    • /path
    • *
    • @post
  • Placeholders
  • Snippets
    • import directive
  • Named Routes
  • Comments
  • Environment variables
  • Types support
    • string
    • quoted strings
    • numerical
    • boolean
    • time (1s, 1m, 1h, 1d)
    • size (1KB, 1MiB)
  • Expressions
    • After-placeholder expressions ({method}.startsWith("P"))
    • Expressions (header({'Connection':'*Upgrade*','Upgrade':'websocket'})
  • Special cases
    • Placeholders can't be found in random string (redir https://www.{host}{uri})

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published