[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omaha.pm] Plack - 1 line web app



Day 1 at my new day job. They use PSGI/Plack for web app development:

   http://plackperl.org/

Here's a sample application:

$ cat app.psgi 
sub { [ 200, [ 'Content-Type' => 'text/html' ], [ 'Hello World' ] ] }

And here's me launching a web server of that application:

$ plackup 
HTTP::Server::PSGI: Accepting connections at http://0:5000/

And here's what Firefox sees:

http://localhost:5000/
Hello World

Web app development doesn't get briefer than that.   :)    Thanks to PSGI the exact same app can then deploy to Apache or nginx or whatever PSGI-compatible server you want. It's a brave new world for my aging brain...   :)

Jay Hannah
Software Architect
jhannah@mutationgrid.com | http://mutationgrid.com | 1-402-598-7782