Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

シンプルなサンプル追加

  • Loading branch information...
commit 34d7e3cb584d6f7359c21cba125e07da5992b2ac 1 parent a394f23
Kentaro Kuribayashi authored
2  eg/guestbook/app.psgi
@@ -7,7 +7,7 @@ my $root = dir(__FILE__)->parent;
7 7 use Plack::Builder;
8 8
9 9 use lib 'eg/guestbook/lib';
10   -use guestbook;
  10 +use GuestBook;
11 11
12 12 builder {
13 13 enable 'Plack::Middleware::Static',
21 eg/simple/app.psgi
... ... @@ -0,0 +1,21 @@
  1 +use strict;
  2 +use warnings;
  3 +
  4 +use Path::Class;
  5 +my $root = dir(__FILE__)->parent;
  6 +
  7 +use Plack::Builder;
  8 +
  9 +use lib 'eg/simple/lib';
  10 +use MyApp;
  11 +
  12 +builder {
  13 + enable 'Plack::Middleware::Static',
  14 + root => $root->subdir('.'),
  15 + path => qr{^/(images|css|js|favicon)};
  16 +
  17 + sub {
  18 + my $env = shift;
  19 + MyApp->process($env, { root => $root });
  20 + }
  21 +};
12 eg/simple/lib/MyApp.pm
... ... @@ -0,0 +1,12 @@
  1 +package MyApp;
  2 +use strict;
  3 +use warnings;
  4 +
  5 +use Ridge::Lite;
  6 +
  7 +get '/' => sub {
  8 + my $r = shift;
  9 + $r->res->content('Hello World!');
  10 +};
  11 +
  12 +!!1;

0 comments on commit 34d7e3c

Please sign in to comment.
Something went wrong with that request. Please try again.