convert cookbook index page to template
[angular-mojolicious.git] / angular-server.pl
index e21ec59..f90740e 100755 (executable)
@@ -26,7 +26,7 @@ get '/_replicate' => sub {
                if ( $database && $entities ) {
                        foreach my $entity ( keys %$entities ) {
                                my $url = $from;
-                               $url =~ s{/+$}{/};
+                               $url =~ s{/?$}{/}; # add slash at end
                                $url .= $entity;
                                my $e = $self->client->get( $url )->res->json;
                                warn "# replicated $url ", dump($e);
@@ -100,6 +100,8 @@ get '/demo/:groovy' => sub {
     $self->render(text => $self->param('groovy'), layout => 'funky');
 };
 
+get '/Cookbook' => 'Cookbook';
+
 
 app->start;
 __DATA__