server to JS