Updated indexJS with router
Updated indexJS with router code