 
 # Utils
 
+noop = ->
+
 createStaticServer = (objectName, dir, urlbase, urlsuffix='') ->
   urlbase = '/'+urlbase
   urlsuffix = '\.'+urlsuffix+'/' if urlsuffix.length

    next()

Server.get '/', (req, res, next) ->
  res.header 'Location', '/wm/index.html'
  res.send 301, ""
#  next(false)

# Application static files
createStaticServer "application file", config.staticFilesDir, "wm"

  Server.get urlbase+'/.*'+urlsuffix, (req, res, next) ->
    req.url = req.url.substr urlbase.length  # take off leading /base so that connect locates it correctly
    staticServer req, res, (status) ->
      if status
        return console.error status.toString() + " for path "+req.url
      return res.send new Restify.ResourceNotFoundError("Requested "+objectName+" could not be found")
    return

###
API:
