Update template_setup.js

replaced all occurences of window.location.hostname with the function env() because the former only works on a Mac.