pass router and webPath as constructor params instead of container