Slovo-Plugin-Prodan
view release on metacpan or search on metacpan
t/slovo.conf view on Meta::CPAN
? $home->child('bin', $moniker . '.pid')
: $home->child('script', $moniker . '.pid'),
spare => 4,
workers => 10,
clients => 2,
},
# Some classes which plugins or the application expect to be loaded to enable
# some functionality or to refer to their functions.
load_classes => [qw()],
# Plugins can be Mojolicious and Slovo plugins. Every Slovo::Plugin:: ISA
# Mojolicious::Plugin. Plugin order is important. Any plugin depending on
# another must come after the plugin it depends on. A plugin may be loaded
# twice if it will do different things depending on configuration variables.
load_plugins => [
$mode =~ /^dev/ ? {PODViewer => {default_module => 'Slovo'}} : (),
# In CGI mode startup and runtime are the same thing, so we check here if we
# need this plugin and load it to handle the request.
$ENV{GATEWAY_INTERFACE} ? 'CGI' : (),
{MojoDBx => {auto_migrate => 1}},
{
Authentication => {
autoload_user => 1,
session_key => 'u',
current_user_fn => Slovo::Controller::Auth::current_user_fn(),
load_user => \&Slovo::Controller::Auth::load_user,
validate_user => \&Slovo::Controller::Auth::validate_user,
}
},
qw(DefaultHelpers TagHelpers),
{RoutesConfig => {file => (-e $rmf ? $rmf : $resources->child("etc/routes.conf"))}},
{
'Minion::Admin' =>
sub { {
route => $app->routes->lookup('home_minion'), return_to => 'home_upravlenie',
} }
},
{
Minion => sub { {SQLite => $app->dbx} }
},
{OpenAPI => {url => $resources->child("api-v1.0.json")->to_string}},
# Tasks
{'Task::SendOnboardingEmail' => $mail_cfg},
{'Task::SendPasswEmail' => $mail_cfg},
'Themes::Malka',
{
Prodan => {
migrate => 1,
consents => {
gdpr_url => '/ѿноÑно/ÑÑловиÑ.bg.html',
phone_url => $ENV{SLOVO_PRODAN_PHONE_URL},
delivery_prices_url => undef,
},
econt => {
shop_id => $ENV{SLOVO_PRODAN_SHOP_ID},
private_key => $ENV{SLOVO_PRODAN_PRIVATE_KEY},
shippment_calc_url => 'https://delivery.econt.com/customer_info.php',
crupdate_order_endpoint =>
'https://delivery.econt.com/services/OrdersService.updateOrder.json',
create_awb_endpoint =>
'https://delivery.econt.com/services/OrdersService.createAWB.json'
}}
},
],
secrets => [sha1_sum(encode('utf8', $home . 'Ñайна')),],
# See also /perldoc/Mojolicious/Sessions
sessions => [
#attribute => value
{default_expiration => 3600 * 24 * 5}, #five days
{cookie_name => 'slovo'},
],
# Root folder where domain specific files will reside. Each domain has it's
# own folder there.
domove_root => $home->child('domove')->to_string,
# Cache published pages for non authenticated users
$mode =~ /^dev/ ? () : (cache_pages => 1),
# Cache-Control header for non authenticated users. For authenticated users
# the max-age is the same, but 'public' is replaced with 'private'.
cache_control => 'public, max-age=' . (1 * 3600), # 1 hour
response_compression => 0,
}
( run in 1.846 second using v1.01-cache-2.11-cpan-2398b32b56e )