Pinto
Pinto copied to clipboard
Customizing the Server (Landing Page, etc)
I wanted to put a front-end onto Pinto to provide a landing page with some help on how to add modules to the repo, and a list of what's available.
The solution I came up with works, but it might be nice to have a supported method in future.
I ended up with the following:
Plack::Builder inside a .psgi file
mount my small Mojo::Lite app at "/" Enable Plack::Middleware::Static to serve static assets (js/css) and also configured it to serve the modules/authors directories. Used Parse::CPAN::Modules to read the modules list to render on the landing page.
I wanted to put a front-end onto Pinto to provide a landing page with some help on how to add modules to the repo, and a list of what's available.
Great idea! Can you share your work? I might be able to build this feature directly into Pinto::Server.
Sure, here's a gist...
https://gist.github.com/lstanden/9659802
It was the simplest solution that got things going, but there's plenty of features in Pinto that this wouldn't support.