MojoliciousLite: 实时的web框架:
SYNOPSIS 简介:
# Automatically enables "strict", "warnings", "utf8" and Perl 5.10 features
use Mojolicious::Lite;
# Route with placeholder
get '/api/:foo' => sub {
my $c = shift;
my $foo = $c->param('foo');
$c->render(text => "Hello from $foo.");
};
# Start the Mojolicious command system
app->start;
zjzc01:/root/mojo# curl http://127.0.0.1:3000/api/xx
Hello from xx.
zjzc01:/root/mojo# curl http://127.0.0.1:3000/api/abc123
Hello from abc123.zjzc01:/root/mojo#
描述:
Mojolicious::Lite 是一个微型实时框架:
Mojolicious::Lite 实现了下面的函数,自动导出。
any
my $route = an
MojoliciousLite: 实时的web框架 概述
最新推荐文章于 2023-09-03 07:16:10 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)