first commit
This commit is contained in:
25
lite.pl
Normal file
25
lite.pl
Normal file
@@ -0,0 +1,25 @@
|
||||
# Automatically enables "strict", "warnings", "utf8" and Perl 5.16 features
|
||||
use Mojolicious::Lite -signatures;
|
||||
use Data::Printer;
|
||||
|
||||
# Route with placeholder
|
||||
get '/:foo' => sub ($c) {
|
||||
my $foo = $c->param('foo');
|
||||
$c->render(text => "Hello");
|
||||
};
|
||||
|
||||
get '/' => sub ($c) {
|
||||
p $c->tx->req;
|
||||
$c->render(text => "Hello");
|
||||
|
||||
};
|
||||
|
||||
post '/*' => sub ($c) {
|
||||
p $c->tx;
|
||||
|
||||
$c->render(text => "Helloo.");
|
||||
|
||||
};
|
||||
|
||||
# Start the Mojolicious command system
|
||||
app->start;
|
||||
Reference in New Issue
Block a user