register plugin
[MojoFacets.git] / lib / MojoFacets.pm
index e68fde8..cfddc99 100644 (file)
@@ -28,7 +28,7 @@ sub save_tx {
                                $time = $time_travel;
                        }
 
-                       my $path = '/tmp/changes/';
+                       my $path = '/tmp/actions/';
                        mkdir $path unless -e $path;
                        $path .= sprintf '%.4f.%s', $time, join('.', @$parts);
 
@@ -38,6 +38,7 @@ sub save_tx {
        }
 }
 
+use MojoFacets::Plugin::NYTProf;
 
 # This method will run once at server start
 sub startup {
@@ -47,7 +48,7 @@ sub startup {
     my $r = $self->routes;
 
     # Default route
-    $r->route('/:controller/:action/:id')->to('data#index', id => 1);
+    $r->route('/:controller/:action/:id')->to('data#index', id => 0);
 
 #      $self->plugin( 'request_timer' );
 
@@ -58,6 +59,8 @@ sub startup {
                                save_tx( $self, $tx );
                        }
        );
+
+       MojoFacets::Plugin::NYTProf->register( $self );
 }