package hello_solr;

use strict;
use warnings;

use base 'Mojolicious';

# This method will run once at server start
sub startup {
    my $self = shift;

    # Use our own context class
    #$self->ctx_class('HelloSolr::Context');

    # Routes
    my $r = $self->routes;

	  # toには全ての初期値を書かないと"/"できない
    $r->route('/:action/:page/:query')
      ->to(controller => 'example', action => 'select', page => 1, query => '*:*');
}

sub development_mode {
    my $self = shift;
    $self->log->handle(*STDERR);
}

sub production_mode {
    my $self = shift;
    $self->log->level('error');
}

1;

1;
