Skip to content

Commit 80470de

Browse files
committed
server.pl to know / => index.html
1 parent 4a3d3ae commit 80470de

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

server.pl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#!/usr/bin/env perl
22

3-
use Mojolicious::Lite;
3+
use Mojolicious::Lite -signatures;
44

55
use Cwd;
66
app->static->paths->[0] = getcwd;
77

8-
get '/' => sub {
9-
shift->reply->static('index.html');
8+
get '/*whatever' => {whatever => 'index.html'} => sub ($c) {
9+
$c->reply->static($c->stash('whatever') =~ s#/$#/index.html#r);
1010
};
1111

1212
app->start;
13-

0 commit comments

Comments
 (0)