Update index.js

handle nested routers path correctly