fixed res.locals

property res.locals is not a function