Commit c548c3b0 authored by Yadd's avatar Yadd
Browse files

Starman app

parent ee73029d
Pipeline #1037 passed with stage
in 2 minutes and 15 seconds
#!/usr/bin/perl
use Data::Dumper;
use Plack::Builder;
# Basic test app
my $testApp = sub {
my ($env) = @_;
return [
200,
[ 'Content-Type' => 'text/plain' ],
[ "Hello LLNG world\n\n" . Dumper($env) ],
];
};
# Build protected app
my $test = builder {
enable "Auth::LemonldapNG";
$testApp;
};
# Build portal app
use Lemonldap::NG::Portal::Main;
my $portal = builder {
enable "Plack::Middleware::Static",
path => '^/static/',
root => 'lemonldap-ng-portal/site/htdocs/';
Lemonldap::NG::Portal::Main->run( {} );
};
# Build manager app
use Lemonldap::NG::Manager;
my $manager = builder {
enable "Plack::Middleware::Static",
path => '^/static/',
root => 'lemonldap-ng-manager/site/htdocs/';
enable "Plack::Middleware::Static",
path => '^/doc/',
root => '.';
enable "Plack::Middleware::Static",
path => '^/lib/',
root => 'doc/pages/documentation/current/';
enable "Plack::Middleware::Static",
path => '^/fr-doc/',
root => 'po-doc/';
Lemonldap::NG::Manager->run( {} );
};
# Global app
builder {
mount 'http://test1.example.com/' => $test;
mount 'http://auth.example.com/' => $portal;
mount 'http://manager.example.com/' => $manager;
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment