 			box-shadow: 0 0px 20px #666;
 			min-height: 500px;
 		}
-	
+
 		a {color: #4E5989; text-decoration: underline;}
 		a:hover {text-decoration: none;}
 
 		#wrapper {width: 750px; margin: 0 auto;}
-	
+
 		h1 {border-bottom: 1px solid #999; width: 100%; font: 30px Tahoma, Geneva, sans-serif}
 		h2 {font: 20px Tahoma, Geneva, sans-serif}
 

				p @about or 'Developer was too lazy to describe this widget'

				h2 'Examples:'
		
				if @examples
					ul ->
						for example in @examples
							li -> a href: example.href, -> example.caption
				else
					p 'Developer was too lazy to define any examples.'
		
				h2 'Parameters'
		
				if @params
					table ->
						tbody ->


	# starts the server
	@server.listen process.env.PORT || process.env.C9_PORT || config.port
	log.info "Timbits server listening on port #{@server.address().port} in #{@server.settings.env} mode"
	server.address = @server.address().address
	server.port = @server.address().port
	return @server

# the box that holds each of the individual timbits created
@box = {}

# use the 'add' method to place a timbit in the box
@add = (name, timbit) ->
	#place the timbit in the box
	log.notice "Placing #{name} in the box"
	timbit.name = name
	@box[name] = timbit

	# configure help
	@server.get ("/#{name}/help"), (req, res) ->
		res.send ck.render(timbit.help, context: timbit)

	@server.get ("/#{name}/test"), (req, res) ->
		timbit.test server, timbit, (results) ->
			#res.render "#{context.name}/#{context.view}", context: context
			res.send ck.render(test, context: results)

	# configure the route
	@server.get ("/#{name}/:view?"), (req, res) ->

		try
			# initialize current request context
			context = {}
			context[k] = v for k,v of req.query

			context.name = name
			context.view = req.params.view ?= 'default'

			# validate the request
			for key, attr of timbit.params
				context[key] ?= attr.default
				value = context[key]

				if attr.required and not value
					throw "#{key} is a required parameter"

				if value and attr.strict and attr.values.indexOf(value) is -1
					throw "#{value} is not a valid value for #{key}.  Must be one of [#{attr.values.join()}]"

				if value instanceof Array and not attr.multiple
					throw "#{key} must be a single value"

			# with context created, it's time to consume this timbit
			timbit.eat req, res, context
		catch ex
