summaryrefslogtreecommitdiffstats
path: root/notes.txt
blob: 886fc009991a0a9e0f94a512654102de498943d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[express]
$ express
do '# npm install -g express' beforehand, express command
generates nice template dir structure to get started

[code analysis]
# npm install -g jslint
$ jslint --sloppy --white <file.js>

[make a copy of an array]
var foo = [1, 2, 3];
var bar = foo.slice(0);

- an object that listen for event must be subclass of
  of events.EventEmitter, e.g. http.createServer()

  I'm an eventer, I will emit events, and have a list of
  who responds/listens to those, so we will see statements
  such eventer.on('foo', somehandler)