node js


Some notes I’ve seen say to install the 32 bit version on a 64bit system. In some cases, because IIS Express only ships as 32bit. But if you’re not using IIS (Express), can you use 64bit?


I ended up using these notes and not integrating with IIS (yet?).


Since I’m working in Emacs, I’ve been updating notes @ EmacsWiki:NodeJs


I’ve installed node and js-comint, but tab-completion is not supported. Nor in swank-js, AFAIK (which I haven’t tried yet)


upgrading & installation

(on windows, at least) Just run the latest installer.


Can use Chocolatey: cinst nodejs.install to install node and npm, cup nodejs.install -y to upgrade both Node and npm


Do NOT run cinst nodejs - Chocolately’s nodejs is an alias for nodejs.commandline which simply installs Node.exe to the Chocolatey folder. Does not include NPM.


Once node and npm are installed, running npm i -g npm will update npm (or you can update Node and npm together; see aboe).


npm installation

If you’re getting a Error: No compatible version found: [foo@’^n.n.n’] you may need to update to the latest version of node and npm (see above).



link dump



Shell Scripting


Write your shell scripts in JavaScript, via Node.js

Transforming HTML with Node.js and jQuery
New Node.js module “lazylines”: read a text stream, line by line


task automation


Parsing text files using node.js


See also: Jake, JavaScript.ShellScripting



REPL (Read Eval Print Loop)
How do I use node’s REPL?


There are a few special REPL commands:

.break - While inputting a multi-line expression, sometimes you get lost or just don’t care about completing it. .break will start over.
.clear - Resets the context object to an empty object and clears any multi-line expression.
.exit - Close the I/O stream, which will cause the REPL to exit.
.help - A:Show this list of special commands.


ultra REPL


Installation instructions say to use an included .cmd file to launch, but I found it tried to launch PUTTY for no reason I could see (in the, say, 30 seconds I spent worrying about it).


However, the following worked:

  1. launch windows shell
  2. cd to \path\node_modules\ultra-repl\bin
  3. node ultra-repl.js


UPDATE: (a few minutes later) As I wrote the above, I was slightly suspicious, as the upper-left of the launched nodejs instance looked like the putty logo.


It is.


I looked at the source code, and saw that it had an INVARIANT launch of putty if the environment was windows (which mine is).


I tried the .cmd file a second time, and it launched fine.
Not sure what happened the first time around.
I _should have_ grabbed a screencap.


link dump


markov chain module for node.js




Learn Node.js Completely and with Confidence - book recommendations and pace of study based on them - provides (via npm) four command-line based “lesson plans” (here’s a review)

  1. Learn You the Node.js For Much Win!
  2. Stream Adventure
  3. Level Me Up Scotty
  4. Functional Javascript








Shared rendering in node and browser - that is, browserify



See Also





JavaScript shell scripting serverside