Update router.js

change use of viewGenerator as it is now a straight object