Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 20 lines (18 sloc) 0.662 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use strict;
use warnings FATAL => 'all';
use utf8;
use File::Spec;
use File::Basename;
use lib File::Spec->catdir(dirname(__FILE__), 'extlib', 'lib', 'perl5');
use lib File::Spec->catdir(dirname(__FILE__), 'lib');
use MailTouch::Web;
use Plack::Builder;

print "run Mailtouch under the $ENV{PLACK_ENV}\n";

my $config = do File::Spec->catfile(File::Spec->catdir(dirname(__FILE__)), 'config', "$ENV{PLACK_ENV}.pl");
builder {
    enable 'Plack::Middleware::Static',
        path => qr{^(?:/static/|/robot\.txt$|/favicon.ico$)},
        root => File::Spec->catdir(dirname(__FILE__));
    enable 'Plack::Middleware::ReverseProxy';
    MailTouch::Web->to_app();
};
Something went wrong with that request. Please try again.