Ado
view release on metacpan or search on metacpan
etc/ado.conf view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
my $home = app->home;
my $mode = app->mode;
my $moniker = app->moniker;
my $ado_home = app->ado_home;
my $database_file =
-s $home->rel_file("etc/$moniker.$mode.sqlite")
? $home->rel_file("etc/$moniker.$mode.sqlite")
: $home->rel_file("etc/$moniker.sqlite");
$database_file =
-s $database_file
? $database_file
: $ado_home->rel_file('etc/ado.sqlite');
#This is the default Ado (Mojolicious) application configuration file.
#Application instance is also available here via "app" Mojolicious specific keyword.
#Documentation can be accessed at http://localhost:3000/perldoc/
#The operating mode for your application, defaults to a value
#from the MOJO_MODE and PLACK_ENV environment variables or 'development'.
#See /perldoc/Mojolicious/#mode
#Uncomment the line below to change it to 'production'.
#app->mode('production');
#Fallback to some default secret for this deployment
#See /perldoc/Mojolicious#secrets
#app->secrets([Mojo::Util::sha1_sum($mode . $home),]);
#Application/site specific templates
#See /perldoc/Mojolicious/Renderer#paths
#unshift @{app->renderer->paths}, $home->rel_dir('site_templates');
#Application specific static files
#See /perldoc/Mojolicious/Static
#It is better to leave static files to be served by a server like Apache
#This setting can be used during development.
#unshift @{$app->static->paths}, app->home->rel_dir('path/to/other/public/files');
#Setting the Controller class from which all controllers must inherit.
#See /perldoc/Mojolicious/#controller_class
#See /perldoc/Mojolicious/Guides/Growing#Controller_class
app->controller_class('Ado::Control');
#Namespace(s) to load controllers from
#See /perldoc/Mojolicious#routes
#app->routes->namespaces(['Ado::Control']);
#Namespaces to load plugins from
#See /perldoc/Mojolicious#plugins
#See /perldoc/Mojolicious/Plugins#PLUGINS
#app->plugins->namespaces(['Mojolicious::Plugin', 'Ado::Plugin',]);
#Ado namespace to load commands from
#See /perldoc/Mojolicious/#commands
#See /perldoc/Ado/Command
#unshift @{app->commands->namespaces}, 'Ado::Command';
# Add custom MIME type
#See /perldoc/Mojolicious/#types
#app->types->type(twt => 'text/tweet');
#Stash defaults. See /perldoc/Mojolicious/#defaults
my $sui_path = 'vendor/SemanticUI/components';
app->defaults(
layout => 'default',
sui_path => $sui_path,
head_css => [
$sui_path . '/reset.min.css',
$sui_path . '/site.min.css',
$sui_path . '/transition.min.css',
],
head_javascript => [
'mojo/jquery/jquery.js',
#TODO: report problem with easing when loading separate js components
$sui_path . '/transition.min.js',
]
);
{
# Hypnotoad Settings (optimized for blocking operations)
# See /perldoc/Mojo/Server/Hypnotoad#SETTINGS
# and /perldoc/Mojolicious/Guides/Cookbook#Hypnotoad
hypnotoad => {
#listen => ['http://*:9090'],
#proxy => 1,
workers => 20,
clients => 1,
},
session => {
#Type of the session this application will use
#Possible values are:
( run in 0.684 second using v1.01-cache-2.11-cpan-5a3173703d6 )