| Version 25 (modified by tokuhirom, 5 years ago) |
|---|
HTTP::Engine
HTTP::Engine->new(
config => 'config.yaml',
handle_request => sub {
my $c = shift;
$c->res->body( 'ok' );
# and you can use $c->req
}
);
Application server to Web Application Framework gateway.
inspired from WSGI(Python) and Rack(ruby).
With this module, you can write your own web application framework very easily, and with less code!
DO NOT REINVENT WEB APPLICATION SERVER TO WEB APPLICATION FRAMEWORK GATEWAY!
IRC
#http-engine@…
SVN REPOS
svn co http://svn.coderepos.org/share/lang/perl/HTTP-Engine/trunk HTTP-Engine
MAILING LIST
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/http-engine
FAQ
- Does HTTP::Engine contain a dispatcher?
- No. Use HTTPx::Dispatcher, or your own.
- Is this ready for production?
- No. but will be soon. We need more committers! Please develop with us.
SUPPORTED ENGINES
- FastCGI (lighty, apache2, etc.)
- mod_perl
- CGI (of course, very slow :-)
- HTTP::Server::Simple
TODO
- no Plugins, pluginはHTTP::Engineの中には不要
- read API, write API on Interface
- Middleware 移行に STDIN STDOUT を使わせない
eval {
local *STDIN;
local *STDOUT;
$self->{handle_request}->($context);
};
こんなコードを handle_request 投げる前に書く
- read/write API を使わずに STDIN/STDOUT にするなら、Role::Interface に code ref 渡すと print STDOUT $buf; したときに $buf を code ref に渡す method 追加する
http://d.hatena.ne.jp/yappo/20080513/1210615145
- POE Engine
- Danga::Socket
- ModPerl?13 ModPerl?2
- Middleware Example (Request hook[session, mobileattribute, cookie], Response Filter [utf8 flag, encoding, fillinform? and more...]), Encodings, gzip
- some protocols (jabber stomp smtp(kazuho))
- more testings...
- for Catalyst, Jifty and Sledge
Interface Memo
| Interface | Socket Handle | io |
| Standalone | yes | Socket |
| ServerSimple? | ||
| CGI | any | STDIN/STDOUT |
| FCGI | any | STDIN/STDOUT |
| ModPerl? | none | $r |
| POE | none | POE::SocketFactory? |
| Danga::Socket | none | evt ... |
AUTHOR
- Committer:yappo
- Committer:lestrrat (mod_perl support)
- Committer:tokuhirom moose (copy and paste Cat::Engine::FastCGI :), StackTrace?, H::S::S support)
- Committer:nyarla (CGI support)
- Committer:marcus
and Catalyst::Engine Authors
httpebot config
global:
plugin_path:
- plugins
timezone: Asia/Tokyo
log:
level: error
plugins:
- module: Subscription::Config
config:
feed:
- http://coderepos.org/feeds/share.xml
- module: Aggregator::Simple
- module: Filter::Rule
rule:
- module: Deduped
path: ~/plagger/httpe.db
- module: Notify::IRC
rule:
- expression: '$args->{entry}->title =~ m{lang/perl/HTTP-Engine}'
config:
daemon_port: 9992
nickname: httpebot
server_host: irc.perl.org
server_port: 6667
server_channels:
- #http-engine
charset: utf-8
announce: notify
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)