Changeset 119 in bookmarks for trunk/lib/BookmarksApp.pm


Ignore:
Timestamp:
02/22/16 17:30:47 (8 years ago)
Author:
peter
Message:

#15: Use Plack::Middleware::Static to serve static assets.

Moved the CSS and Javascript for creating the popup window into external static assets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/BookmarksApp.pm

    r118 r119  
    4242use Plack::Request; 
    4343use Router::Resource; 
     44use File::Basename qw{dirname}; 
     45use File::Spec::Functions qw{catfile}; 
    4446 
    4547use Bookmarks::Controller; 
     
    156158                }, 
    157159            ) if $config->{auth}; 
     160            enable 'Static', ( 
     161                path => qr{^/assets/}, 
     162                root => catfile(dirname(__FILE__), 'htdocs'), 
     163            ); 
    158164            sub { $router->dispatch(shift); }; 
    159165        } 
Note: See TracChangeset for help on using the changeset viewer.