separate Node script from shell (compatibility)

(commit reason change, no code change)