 
 		sendRequestToRoutes ctx, routes, next
 
+###
+# The [Koa](http://koajs.com/) middleware function that enables the
+# router to work with the Koa framework. CoffeeScript does not support
+# ES6 generators yet so this function has to be passed through as pure
+# Javascript.
+#
+# Use with: app.use(router.koaMiddleware)
+###
 exports.koaMiddleware = `function *routeMiddleware(next) {
-		console.log("Starting routing");
 		var route = Q.denodeify(exports.route);
 		yield route(this);
 		yield next;

			routeReq.write ctx.request.body
		routeReq.end()

exports.route = (ctx, next) ->
	routes = []


			else
				return done null, items

###
# Adds a new channel.
# 
# Accepts (channel, done) where channel is a Channel object and done is a
# callback that will be called once the channel is saved. If an error occurs it
# will return an Error object.
###
exports.addChannel = (channel, done) ->
	getCollection (collection) ->
		collection.find {name: channel.name}, {limit: 1}, (err, results) ->
