Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
lemonldap-ng
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Bachelot
lemonldap-ng
Commits
0dabe56f
Commit
0dabe56f
authored
Mar 15, 2018
by
Xavier Guimard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Plack app (#1397)
parent
0e4fffaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
_example/plack-app/llng.psgi
_example/plack-app/llng.psgi
+11
-7
No files found.
_example/plack-app/llng.psgi
View file @
0dabe56f
...
...
@@ -3,46 +3,50 @@
use
Data::
Dumper
;
use
Plack::
Builder
;
#
Test
#
Basic test app
my
$testApp
=
sub
{
my
(
$env
)
=
@_
;
return
[
200
,
[
'
Content-Type
'
=>
'
text/plain
'
],
[
"
Hello world
\n\n
"
.
Dumper
(
$env
)
],
[
"
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
=>
'
/home/xavier/dev/lemonldap/lemonldap-ng-portal/site/htdocs/
';
root
=>
'
__PORTALSITEDIR__
';
Lemonldap::NG::Portal::
Main
->
run
(
{}
);
};
# Build manager app
use
Lemonldap::NG::
Manager
;
my
$manager
=
builder
{
enable
"
Plack::Middleware::Static
",
path
=>
'
^/static/
',
root
=>
'
/home/xavier/dev/lemonldap/lemonldap-ng-manager/site/htdocs/
';
root
=>
'
__MANAGERSITEDIR__
';
enable
"
Plack::Middleware::Static
",
path
=>
'
^/doc/
',
root
=>
'
/home/xavier/dev/lemonldap
/
';
root
=>
'
__DEFDOCDIR__..
/
';
enable
"
Plack::Middleware::Static
",
path
=>
'
^/lib/
',
root
=>
'
/home/xavier/dev/lemonldap/doc/
pages/documentation/current/
';
root
=>
'
__DEFDOCDIR__
pages/documentation/current/
';
enable
"
Plack::Middleware::Static
",
path
=>
'
^/fr-doc/
',
root
=>
'
/home/xavier/dev/lemonldap/po-doc
/
';
root
=>
'
__FRDOCDIR__..
/
';
Lemonldap::NG::
Manager
->
run
(
{}
);
};
# Global app
builder
{
mount
'
http://test1.example.com/
'
=>
$test
;
mount
'
http://auth.example.com/
'
=>
$portal
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment