Set node js endpoint to use https, not http.

Backported from nvm package for bash. See https://github.com/creationix/nvm/blob/master/nvm.sh#L53