NodeJs

 

 

node js

http://nodejs.org/

 


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)

 

As of Dec 2017 I’ve started using JSCode for Node development. I miss a lot of my Emacs customizations, but the other seamless integrations make up for it.

 

 

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

http://substack.net/how_I_write_modules
http://substack.net/shared_rendering_in_node_and_the_browser

 

 

Shell Scripting

http://www.phpied.com/javascript-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

 

http://flippinawesome.org/2013/07/29/writing-a-command-line-utility-using-node

 

Parsing text files using node.js

 

See also: Jake, JavaScript.ShellScripting

 

 

REPL (Read Eval Print Loop)

http://nodejs.org/docs/v0.3.1/api/repl.html
How do I use node’s REPL?
https://npmjs.org/package/node-web-repl
http://stackoverflow.com/questions/6220420/node-js-multi-line-string

 

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.

 

 

Learning

Learn Node.js Completely and with Confidence - book recommendations and pace of study based on them

 

nodeschool.io - 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

 

 

package.json

https://blog.nodejitsu.com/package-dependencies-done-right

 

 

See Also

JavaScript.ShellScripting

 

 

Tags

JavaScript shell scripting serverside