OpenResty::Dispatcher - The main dispatcher for the OpenResty server
use OpenResty::Dispatcher; OpenResty::Dispatcher->init($context); # $context is the bin/openresty script's input command, # like 'fastcgi', 'cgi', or 'upgrade'. my $res = OpenResty::Dispatcher->process_request($cgi);
All the methods below are static. This class has no instances.
init($context)
Connects to the database and preserving the global database connection, reads the config options, checks the metamodel version if $context is not "upgrade", and does other initialization jobs.
$context
upgrade
$res = process_request($cgi, $call_level, $parent_account)
Process the incoming OpenResty RESTful request (not necessarily HTTP requests though). The first argument is a CGI object while the latter two only make sense in recursive calls issued by OpenRsety actions.
Agent Zhang (agentzh) <agentzh@yahoo.cn>.
<agentzh@yahoo.cn>
OpenResty.
To install OpenResty, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenResty
CPAN shell
perl -MCPAN -e shell install OpenResty
For more information on module installation, please visit the detailed CPAN module installation guide.