Parsing routes using path-to-regexp like express does