- clone this repo
git clone git@github.com:MRN-Code/coinstac-distributed-algorithm-set.git - cd to the folder and run
npm ito install js depedencies - run
node example.jsto exec the script
You may find the nodejs debugger useful. GUI debuggers exist, such as node-inspector, although it is generally more performant and reliable to use the cmd line debugger. To debug a script, run npm debug yourScript.js. A cheat sheet for the debugger can be found here. Remember, to inspect variables, you must enter into the REPL by typing repl then enter. Control+c to exit the repl and resume navigating your code.
Committing will automatically enforce MRN style code. Please be weary that you may need to reformat some of your code to fall in spec. If you don't want to do this manually for each file, you simply can run jscs -x your-file.js or jscs -x ./**/*.js to patch all files. If jscs is not installed, run sudo npm i -g jscs. Sometimes it will only fix 99% of the errors--you may have to manually adjust some :).