1Twiggy(3)             User Contributed Perl Documentation            Twiggy(3)
2
3
4

NAME

6       Twiggy - AnyEvent HTTP server for PSGI
7

SYNOPSIS

9         twiggy --listen :8080
10
11       See "twiggy -h" for more details.
12
13         use Twiggy::Server;
14
15         my $server = Twiggy::Server->new(
16             host => $host,
17             port => $port,
18         );
19         $server->register_service($app);
20
21         AE::cv->recv;
22

DESCRIPTION

24       Twiggy is a lightweight and fast HTTP server with unique features such
25       as:
26
27       PSGI
28           Can run any PSGI applications. Fully supports psgi.nonblocking and
29           psgi.streaming interfaces.
30
31       AnyEvent
32           This server uses AnyEvent and runs in a non-blocking event loop, so
33           it's best to run event-driven web applications that runs I/O bound
34           jobs or delayed responses such as long-poll, WebSocket or streaming
35           content (server push).
36
37           This software used to be called Plack::Server::AnyEvent but was
38           renamed to Twiggy.
39
40       Fast header parser
41           Uses XS/C based HTTP header parser for the best performance.
42           (optional, install the HTTP::Parser::XS module to enable it; see
43           also Plack::HTTPParser for more information).
44
45       Lightweight and Fast
46           The memory required to run twiggy is 6MB and it can serve more than
47           4500 req/s with a single process on Perl 5.10 with MacBook Pro 13"
48           late 2009.
49
50       Superdaemon aware
51           Supports Server::Starter for hot deploy and graceful restarts.
52
53           To use it, instead of the usual:
54
55               plackup --server Twiggy --port 8111 app.psgi
56
57           install Server::Starter and use:
58
59               start_server --port 8111 -- plackup --server Twiggy app.psgi
60

ENVIRONMENT

62       The following environment variables are supported.
63
64       TWIGGY_DEBUG
65           Set to true to enable debug messages from Twiggy.
66

LICENSE

68       This module is licensed under the same terms as Perl itself.
69

AUTHOR

71       Tatsuhiko Miyagawa
72
73       Tokuhiro Matsuno
74
75       Yuval Kogman
76
77       Hideki Yamamura
78
79       Daisuke Maki
80

SEE ALSO

82       Plack AnyEvent Tatsumaki
83
84
85
86perl v5.36.0                      2022-07-22                         Twiggy(3)
Impressum