/**
 * This file is where you define your application routes and controllers.
 * 
 * Start by including the middleware you want to run for every request;
 * you can attach middleware to the pre('routes') and pre('render') events.
 * 
 * For simplicity, the default setup for route controllers is for each to be
 * in its own file, and we import all the files in the /routes/views directory.
 * 
 * Each of these files is a route controller, and is responsible for all the
 * processing that needs to happen for the route (e.g. loading data, handling
 * form submissions, rendering the view template, etc).
 * 
 * Bind each route pattern your application should respond to in the function
 * that is exported from this module, following the examples below.
 * 
 * See the Express application routing documentation for more information:
 * http://expressjs.com/api.html#app.VERB
 */

var keystone = require('keystone'),
	middleware = require('./middleware'),
	importRoutes = keystone.importer(__dirname);

// Common Middleware
keystone.pre('routes', middleware.initLocals);
keystone.pre('render', middleware.flashMessages);

// Import Route Controllers
var routes = {
	views: importRoutes('./views')
};

// Setup Route Bindings
exports = module.exports = function(app) {
	'use strict';
	
	// Views
	app.get('/'							, routes.views.main);
	app.get('/page/*'					, routes.views.page);
	app.get('/form/*'					, routes.views.form);
	app.get('/waiting-child-profiles'	, routes.views.waitingChildProfiles);
	app.get('/register'					, routes.views.register);
	app.get('/preferences'				, middleware.requireUser, routes.views.preferences);

	app.post('/register'				, middleware.registerUser);
	app.post('/login'					, middleware.login);
	app.get('/logout'					, middleware.logout);

	app.post('/getChildDetails'			, middleware.getChildDetails);

	app.get('/donate'					, routes.views.donate);
	app.post('/charge'					, middleware.charge);
	
	// NOTE: To protect a route so that only admins can see it, use the requireUser middleware:
	// app.get('/protected', middleware.requireUser, routes.views.protected);
	
};

@@ -1420,16 +1420,64 @@
 .form);%0A
+%09app.get('/events/*'%09%09%09%09%09, routes.views.event);%0A
 %09app.get

Update server-side routing with a handler for /events/* urls.