swap shell script for a node script

to support windows