| use Mojo::Base 'Mojolicious'; |
| # Start the application and register all routes and plugins |
| # Set secret for signed cookies |
| $self->secrets(['fmhsfjgfchgsdbfgshfxztsbt32477eb45veu4vubrghfgghbtv']); |
| # Add additional plugin path |
| push(@{$self->plugins->namespaces}, __PACKAGE__ . '::Plugin'); |
| # 'fontawesome/font-awesome.min.css' |
| $r->get('/')->to('search#remote')->name('index'); |
| $r->get('/tutorial/(*tutorial)', { tutorial => 'start' }) |
| ->to('tutorial#page')->name('tutorial'); |
| my $collection = $r->route('/collection'); |
| $collection->to('search#info'); |
| my $corpus = $r->route('/corpus'); |
| $corpus->route('/:corpus_id')->search; |
| $corpus->route('/:corpus_id/#doc_id')->search; |
| $corpus->route('/:corpus_id/#doc_id/:match_id') |
| ->to('info#about_match')->name('match'); |
| $r->get('/util/query')->to('search#query'); |