 
 my_http.createServer((request,response)->
 	my_path = url.parse(request.url).pathname
+	console.log my_path
 	if my_path is "/save/"
 		url_parts = url.parse request.url, true
 		query = url_parts.query

		pre_query = 'color_query_'

		to_save[k.substr(pre_query.length)] = v for k, v of query when k.indexOf(pre_query) is 0


		console.log to_save

		db.collection 'colours', (err, collection)->
			response.writeHeader 200, {"Content-Type" : "text/plain"}
			if not err
				collection.insert to_save
				response.write '1'
			else
				response.write '0'

		response.write "hello node"
		response.end()

		response.writeHeader 403, {"Content-Type" : "text/plain"}
		response.write "Forbidden Operation\n"
		response.end()
).listen 8080


