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

NAME

6       Twiggy - AnyEvent HTTP server for PSGI (like Thin)
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. See "NAMING" for details.
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

NAMING

68   Twiggy?
69       Because it is like Thin <http://code.macournoyer.com/thin/>, Ruby's
70       Rack web server using EventMachine. You know, Twiggy is thin :)
71
72   Why the cute name instead of more descriptive namespace? Are you on drugs?
73       I'm sick of naming Perl software like
74       HTTP::Server::PSGI::How::Its::Written::With::What::Module and people
75       call it HSPHIWWWM on IRC. It's hard to say on speeches and newbies
76       would ask questions what they stand for every day. That's crazy.
77
78       This module actually includes the longer alias and an empty subclass
79       AnyEvent::Server::PSGI for those who like to type more ::'s. It would
80       actually help you find this software by searching for PSGI Server
81       AnyEvent on CPAN, which i believe is a good thing.
82
83       Yes, maybe I'm on drugs. We'll see.
84

LICENSE

86       This module is licensed under the same terms as Perl itself.
87

AUTHOR

89       Tatsuhiko Miyagawa
90
91       Tokuhiro Matsuno
92
93       Yuval Kogman
94
95       Hideki Yamamura
96
97       Daisuke Maki
98

SEE ALSO

100       Plack AnyEvent Tatsumaki
101
102
103
104perl v5.32.0                      2020-07-28                         Twiggy(3)
Impressum