pass environment to JS