bangor has asked for the wisdom of the Perl Monks concerning the following question:
The code I have for the builder part in test.psgi is:app/test.psgi app/pod-files/test.pod app/static/test.html app/html-files/test.html
The pod and static files serve up fine:builder { enable "Static", path => qr!^/static!, ; enable "Plack::Middleware::Pod", # great module! path => qr!^/pod!, root => 'pod-files', pod_view => 'Pod::POM::View::HTML', ; $app; };
But I want to serve the static files from a different directory to static, so I change the builder to:/app/pod/test.pod OK /app/static/test.html OK
But, this doesnt work - I now get:builder { enable "Static", path => qr!^/static!, root => 'html-files', ; enable "Plack::Middleware::Pod", path => qr!^/pod!, root => 'pod-files', pod_view => 'Pod::POM::View::HTML', ; $app; };
I have played around with different values of 'root' but no luck. Any help appreciated./app/pod/test.pod OK /app/static/test.html not found
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Serving static files with Plack
by bangor (Monk) on Apr 20, 2016 at 23:05 UTC | |
|
Re: Serving static files with Plack
by Anonymous Monk on Apr 20, 2016 at 21:53 UTC | |
by bangor (Monk) on Apr 20, 2016 at 22:16 UTC | |
by Anonymous Monk on Apr 20, 2016 at 23:06 UTC |