// returns the path of the design document function path() { var p = req.path, parts = ['', p[0], p[1] , p[2]]; return parts.join('/'); };