Mojolicious::Plugin::Yancy - Embed a simple admin CMS into your Mojolicious application
version 0.003
use Mojolicious::Lite; plugin Yancy => { backend => 'pg://postgres@/mydb', collections => { ... }, }; ## With custom auth routine use Mojo::Base 'Mojolicious'; sub startup( $app ) { my $auth_route = $app->routes->under( '/yancy', sub( $c ) { # ... Validate user return 1; } ); $app->plugin( 'Yancy', { backend => 'pg://postgres@/mydb', collections => { ... }, route => $auth_route, }); }
This plugin allows you to add a simple content management system (CMS) to administrate content on your Mojolicious site. This includes a JavaScript web application to edit the content and a REST API to help quickly build your own application.
Set up the plugin. Called automatically by Mojolicious.
For getting started with a configuration for Yancy, see "CONFIGURATION" in Yancy.
Additional configuration keys accepted by the plugin are:
A base route to add Yancy to. This allows you to customize the URL and add authentication or authorization. Defaults to allowing access to the Yancy web application under /yancy, and the REST API under /yancy/api.
/yancy
/yancy/api
Doug Bell <preaction@cpan.org>
This software is copyright (c) 2017 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Yancy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Yancy
CPAN shell
perl -MCPAN -e shell install Yancy
For more information on module installation, please visit the detailed CPAN module installation guide.