From 77e50caaf2ef81cd91075cf836fed0e75718ffb4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 23:12:02 +0200 Subject: Adding debian version 1.8.3-2. Signed-off-by: Daniel Baumann --- .../srcdoc/configure/mruby_directives.mt | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 debian/vendor-h2o/srcdoc/configure/mruby_directives.mt (limited to 'debian/vendor-h2o/srcdoc/configure/mruby_directives.mt') diff --git a/debian/vendor-h2o/srcdoc/configure/mruby_directives.mt b/debian/vendor-h2o/srcdoc/configure/mruby_directives.mt new file mode 100644 index 0000000..e1d0e2f --- /dev/null +++ b/debian/vendor-h2o/srcdoc/configure/mruby_directives.mt @@ -0,0 +1,58 @@ +? my $ctx = $main::context; +? $_mt->wrapper_file("wrapper.mt", "Configure", "Mruby Directives")->(sub { + +

+The following are the configuration directives of the mruby handler. +Please refer to Using mruby to find out how to write handlers using mruby. +

+ +{directive}->( + name => "mruby.handler", + levels => [ qw(path) ], + see_also => render_mt(<<'EOT'), +mruby.handler-file +EOT + desc => <<'EOT', +Upon start-up evaluates given mruby expression, and uses the returned mruby object to handle the incoming requests. +EOT +)->(sub { +?> + +{example}->('Hello-world in mruby', <<'EOT') +mruby.handler: | + Proc.new do |env| + [200, {'content-type' => 'text/plain'}, ["Hello world\n"]] + end +EOT +?> + +

+Note that the provided expression is evaluated more than once (typically for every thread that accepts incoming connections). +

+? }) + +{directive}->( + name => "mruby.handler-file", + levels => [ qw(path) ], + see_also => render_mt(<<'EOT'), +mruby.handler +EOT + desc => <<'EOT', +Upon start-up evaluates given mruby file, and uses the returned mruby object to handle the incoming requests. +EOT +)->(sub { +?> + +{example}->('Hello-world in mruby', <<'EOT') +mruby.handler-file: /path/to/my-mruby-handler.rb +EOT +?> + +

+Note that the provided expression is evaluated more than once (typically for every thread that accepts incoming connections). +

+? }) + +? }) -- cgit v1.2.3