create locals helper functions. mapping helper functions as middleware+locals in web.js