#Ado::Plugin::Routes configuration
#If you have a complex route definition, you can use app->routes->route(...)
#See Mojolicious::Guides::Routing,
{   namespaces => [],    #no additional namespaces for now
    routes     => [
        #Add your routes' definitions here.

        #Automatically dispatching to the special stash values
        #'controller' and 'action', trying to match a class and a method
        #See http://localhost:3000/perldoc/Mojolicious/Guides/Routing#Stash
        #http://localhost:3000/perldoc/Mojolicious/Guides/Routing#Special_stash_values
        #Any front-end controllers
        {   route => '/:controller',

            #Reserve 2 letters for languages. See Ado::Plugin I18n
            params => {controller => qr/[\w-]{3,}/},
            via    => [qw(GET OPTIONS)],
            to     => {

                #Ado::Control::Default
                controller => 'Default',
                action     => 'index'
            }
        },
        {   route => '/:controller/:action',

            params => {controller => qr/[\w-]{3,}/, action => qr/\w{3,}/},
            via    => [qw(GET POST OPTIONS)],
            to     => {

                #Ado::Control::Default
                controller => 'Default',
                action     => 'index'
            }
        },
        {   route => '/:controller/:action/:id',

            params => {controller => qr/[\w-]{3,}/, action => qr/\w{3,}/, id => qr/\d+/},
            via => [qw(GET PUT DELETE OPTIONS)],
            to  => {

                #Ado::Control::Default
                controller => 'Default',
                action     => 'form'
            }
        },

        # This route will not be considered at all
        {'index' => undef},
    ],
    #base_url_path => '/',
};