     #and here's a pointless exception to the filename.extension :(
     filePath = filePath.replace(/\.json/, '') if file_extension == 'json'
     
-    console.log req.method+filePath
+    console.log req.method+' '+req.url+': '+filePath
     
+#fulfil the request
+    #read
     fs.readFile filePath, encoding, (err, data) ->
       status = 200
       if err

    file = file.replace(/\?.*$/i, '')     #remove ?random= - or other urlparams
      
    file_extension = file.match(/\.([^\.]*)$/i)
    if !file_extension[0]
      file_extension = 'json'
    else
      file_extension = file_extension[1].toLowerCase()
    
    if ! filetype[file_extension]
      file_extension = 'index'
      file = 'index.html'
      #TODO: do something to load the right page (and here we start with html templating
    
    encoding = filetype[file_extension]['encoding']
    contentType =  filetype[file_extension]['content_type']

}

process.serve_url = (req, res) ->
#work out what resource the request is about
    file = req.url[1..]

    if req.method == 'PUT'
       #nasty hack, as we're only putting pages atm, and the URI's are :(
       file = file.replace(/^page\//, '')    #TODO: mmm, substring anyone?
       file = file.replace(/\/action$/, '')
    
    if file == ''
      console.log 'getting / == welcome-visitors.html topic'
