in reply to Re^2: CSS and PSGI
in thread CSS and PSGI

Certainly no need to be embarassed, how else do we learn but by asking questions? I could have been a bit clearer too! You just need to add the code to your existing file, the my $app = sub { ... }; is a placeholder for what you have already. The important thing is to put the 'builder' part at the very end, so:
use strict; use warnings; use diagnostics; use Template; use Plack::Builder; my $app = sub { my $html = get_html(); # etc }; sub get_html { # etc } builder { enable "Static", path => qr!^/static!, root => '/Library/WebServer +/Documents'; $app; }

Replies are listed 'Best First'.
Re^4: CSS and PSGI
by tiny_monk (Sexton) on Aug 19, 2015 at 15:07 UTC

    tangent, thank you for leading me in the right direction. The code you gave me worked with a little adjustment. I tweaked the regex part in order to conform with the second code found in the advent tutorial you mentioned.

    builder { enable "Static", path => sub { s!^/static/!! }, root => '/Library/ +WebServer/Documents'; $app; }

    I found the code you originally suggested in the same tutorial. Thank you for taking the time. For some reason unknown to me, it needed to be tweaked a little bit. Thanks again and kudos!