mandatory rootdir, provide urlpath to middleware, absolute and relative urlpath, optional resolve node package as module, prepare header locals