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;

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


module.exports = monorouter()
  .route('index', '', function(req) {
    console.log('routing...');
    this.render(App);
  })
  .route('pet', 'pet/:name', function(req) {
    this
      .setView(App)
      .setState({petName: req.params.name})
      .end();
  });

Update server example router to reflect API changes