Created
July 21, 2010 07:59
-
-
Save sharifulin/484208 to your computer and use it in GitHub Desktop.
Idea for Mojolicious::Lite app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
use App::Foo; | |
use App::Bar; | |
for (ref app) { | |
$_->attr(db => sub { ... }); | |
$_->attr(conf => sub { ... }); | |
} | |
app->types->type(json => 'text/plain'); | |
app->log->level('warn'); | |
plugin '...'; | |
# include routes and App::* | |
app->start; | |
package App::Foo; | |
use Mojolicious::Lite; | |
get '/foo' => sub { .. }; | |
1; | |
package App::Bar; | |
use Mojolicious::Lite; | |
get '/' => sub { .. }; | |
get '/bar' => sub { .. }; | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment