 http =			require 'http'
 url =			require 'url'
 accepts =		require 'accepts'
+
+onOPTIONS =		require './methods/options'
+onGET =			require './methods/get'
+onPOST =		require './methods/post'
+onDELETE =		require './methods/delete'
+Context =		require './Context'
 
 
 

		if not name? then throw new Error 'Missing `name` parameter'
		@name = name

		if not logger? then throw new Error 'Missing `logger` parameter'
		@logger = logger

		for method in ['options', 'get', 'post', 'delete']
			@_methods[method] = @['_' + method] this

		thus = this
		@server = http.createServer (req, res) ->




	onOPTIONS:	onOPTIONS
	onGET:		onGET
	onPOST:		onPOST
	onDELETE:	onDELETE

	Context:	Context



	dir:		null
	name:		null
	log:		null
	cors:		false



	init: (dir, name, log) ->
		if not dir? then throw new Error 'Missing `dir` parameter'
		@dir = path.normalize dir
		@relative = path.join '.', path.relative process.cwd(), @dir
