dotCloud で PSGI/Plack hello world

$ mkdir psgi
$ cd psgi
$ gedit dotcloud.yml

www:
  type: perl
  approot: helloperl

$ mkdir helloperl
$ cd helloperl
$ gedit Makefile.PL

PREREQ_PM => {
    'Test::More' => 0,
    'YAML'       => 0,
    'Dancer'     => 1.3030,
    'Plack'      => 0.9974,
},

$ gedit app.psgi

my $app = sub {
    my $env = shift;
    return [
        200,
        [ 'Content-Type' => 'text/plain' ],
        [ "Hello World" ],
    ];
};

$ cd ..
$ dotcloud create psgi
$ dotcloud push psgi


参考


PSGI/Plack