Update view.js

I think it's more conform to express api