名称

Mojo::Server::PSGI-PSGI服务器

简介

使用Mojo::Server::PSGI;my$psgi=Mojo::Server::psgi->new;$psgi->unsubscribe(“请求”)->on(request=>sub($psgi,$tx)){#请求我的$method=$tx->req->方法;我的$path=$tx->req->url->path;#响应$tx->res->code(200);$tx->res->headers->content_type('text/plain');$tx->res->body(“$path!的$method请求”);#恢复交易记录$tx->简历;});我的$app=$psgi->to_psgi_app;

描述

Mojo::服务器::PSGI允许Mojolicious公司要在所有上运行的应用程序PSGI公司兼容的服务器。

请参见Mojolicious::Guides::Cookbook中的“部署”了解更多信息。

活动

Mojo::服务器::PSGI从继承所有事件Mojo::服务器.

属性

Mojo::服务器::PSGI继承所有属性Mojo::服务器.

方法

Mojo::服务器::PSGI从继承所有方法Mojo::服务器并实现了以下新功能。

运行

我的$res=$psgi->run($env);

运行PSGI公司.

到_psgi_app

我的$app=$psgi->to_psgi_app;

转弯Mojolicious公司应用程序到PSGI公司应用程序。

另请参阅

Mojolicious公司,Mojolicious::指南,https://mojolicious.org.