var monorouter = require('../../lib');
var App = require('../build/server');

var Router = monorouter.createRouterClass();
Router
  .route({
    name: 'index',
    path: '',
    handler: function() {
      this.setView(App);
    }
  })
  .route({
    name: 'pet',
    path: 'pet/:name',
    handler: function() {
      var petName = this.request.params.name;
      this.setView(function() {
        return App({petName: petName});
      });
    }
  });

module.exports = Router;

@@ -75,116 +75,60 @@
 );%0A%0A
-var Router = monorouter.createRouterClass();%0ARouter%0A  .route(%7B%0A    name: 'index',%0A    path: '',%0A    handler:
+%0Amodule.exports = monorouter()%0A  .route('index', '',
  fun
@@ -133,24 +133,27 @@
 unction(
+req
 ) %7B%0A    
   this.s
@@ -148,103 +148,90 @@
     
-  this.setView(App);%0A    %7D%0A  %7D)%0A  .route(%7B%0A    name: 'pet',%0A    path: 'pet/:name',%0A    handler:
+console.log('routing...');%0A    this.render(App);%0A  %7D)%0A  .route('pet', 'pet/:name',
  fun
@@ -236,24 +236,27 @@
 unction(
+req
 ) %7B%0A    
   var pe
@@ -251,60 +251,19 @@
     
-  var petName = this.request.params.name;
+this
 %0A      
-this
 .set
@@ -271,105 +271,73 @@
 iew(
-function() %7B%0A        return App(%7BpetName: petN
+App)%0A      .setState(%7BpetName: req.params.n
 ame%7D)
-;
 %0A      
-%7D);%0A    %7D%0A  %7D);%0A%0Amodule.exports = Router
+.end();%0A  %7D)
 ;%0A

Update server example router to reflect API changes