Author(s): Flavio Copes
Year: 2018
Language: English
Pages: 189
The Node.js Handbook......Page 5
Introduction to Node......Page 6
A brief history of Node......Page 11
How to install Node......Page 14
How much JavaScript do you need to know to use Node?......Page 15
Differences between Node and the Browser......Page 17
v8......Page 19
Run Node.js scripts from the command line......Page 22
How to exit from a Node.js program......Page 23
How to read environment variables......Page 25
Node hosting options......Page 26
Use the Node REPL......Page 30
Pass arguments from the command line......Page 34
Output to the command line......Page 36
Accept input from the command line......Page 41
Expose functionality from a Node file using exports......Page 43
npm......Page 45
Where does npm install the packages......Page 49
How to use or execute a package installed using npm......Page 50
The package.json file......Page 53
The package-lock.json file......Page 64
Find the installed version of an npm package......Page 68
How to install an older version of an npm package......Page 70
How to update all the Node dependencies to their latest version......Page 72
Semantic versioning rules......Page 75
Uninstalling npm packages......Page 77
Global or local packages......Page 78
npm dependencies and devDependencies......Page 80
npx......Page 81
The event loop......Page 84
nextTick......Page 94
setImmediate......Page 95
Timers......Page 96
Callbacks......Page 100
Promises......Page 105
async/await......Page 111
The Node Event Emitter......Page 115
HTTP......Page 117
How HTTP Requests work......Page 124
Build an HTTP server......Page 130
Making HTTP requests......Page 132
Axios......Page 134
Websockets......Page 139
HTTPS, secure connections......Page 143
File descriptors......Page 145
File stats......Page 147
File paths......Page 149
Reading files......Page 151
Writing files......Page 152
Working with folders......Page 154
The fs module......Page 157
The path module......Page 160
The os module......Page 163
The events module......Page 168
The http module......Page 172
Streams......Page 178
Working with MySQL......Page 184
Difference between development and production......Page 188