The Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA. See credits at the end of this book whom contributed to the various chapters. Images may be copyright of their respective owners unless otherwise specified
Book created for educational purposes and is not affiliated with group(s), company(s) nor Stack Overflow. All trademarks belong to their respective company owners
https://goalkicker.com/
章節目錄
1-1Content list
1-2About
1-3Chapter 1: Getting started with Node.js
1-4Section 1.1: Hello World HTTP server
1-5Section 1.2: Hello World command line
1-6Section 1.3: Hello World with Express
1-7Section 1.4: Installing and Running Node.js
1-8Section 1.5: Debugging Your NodeJS Application
1-9Section 1.6: Hello World basic routing
1-10Section 1.7: Hello World in the REPL
1-11Section 1.8: Deploying your application online
1-12Section 1.9: Core modules
1-13Section 1.10: TLS Socket: server and client
1-14Section 1.11: How to get a basic HTTPS web server up and running!
1-15Chapter 2: npm
1-16Section 2.1: Installing packages
1-17Section 2.2: Uninstalling packages
1-18Section 2.3: Setting up a package configuration
1-19Section 2.4: Running scripts
1-20Section 2.5: Basic semantic versioning
1-21Section 2.6: Publishing a package
1-22Section 2.7: Removing extraneous packages
1-23Section 2.8: Listing currently installed packages
1-24Section 2.9: Updating npm and packages
1-25Section 2.10: Scopes and repositories
1-26Section 2.11: Linking projects for faster debugging and development
1-27Section 2.12: Locking modules to specific versions
1-28Section 2.13: Setting up for globally installed packages
1-29Chapter 3: Web Apps With Express
1-30Section 3.1: Getting Started
1-31Section 3.2: Basic routing
1-32Section 3.3: Modular express application
1-33Section 3.4: Using a Template Engine
1-34Section 3.5: JSON API with ExpressJS
1-35Section 3.6: Serving static files
1-36Section 3.7: Adding Middleware
1-37Section 3.8: Error Handling
1-38Section 3.9: Getting info from the request
1-39Section 3.10: Error handling in Express
1-40Section 3.11: Hook: How to execute code before any req and after any res
1-41Section 3.12: Setting cookies with cookie-parser
1-42Section 3.13: Custom middleware in Express
1-43Section 3.14: Named routes in Django-style
1-44Section 3.15: Hello World
1-45Section 3.16: Using middleware and the next callback
1-46Section 3.17: Error handling
1-47Section 3.18: Handling POST Requests
1-48Chapter 4: Filesystem I/O
1-49Section 4.1: Asynchronously Read from Files
1-50Section 4.2: Listing Directory Contents with readdir or readdirSync
1-51Section 4.3: Copying files by piping streams
1-52Section 4.4: Reading from a file synchronously
1-53Section 4.5: Check Permissions of a File or Directory
1-54Section 4.6: Checking if a file or a directory exists
1-55Section 4.7: Determining the line count of a text file
1-56Section 4.8: Reading a file line by line
1-57Section 4.9: Avoiding race conditions when creating or using an existing directory
1-58Section 4.10: Cloning a file using streams
1-59Section 4.11: Writing to a file using writeFile or writeFileSync
1-60Section 4.12: Changing contents of a text file
1-61Section 4.13: Deleting a file using unlink or unlinkSync
1-62Section 4.14: Reading a file into a Buer using streams
1-63Chapter 5: Exporting and Consuming Modules
1-64Section 5.1: Creating a hello-world.js module
1-65Section 5.2: Loading and using a module
1-66Section 5.3: Folder as a module
1-67Section 5.4: Every module injected only once
1-68Section 5.5: Module loading from node_modules
1-69Section 5.6: Building your own modules
1-70Section 5.7: Invalidating the module cache
1-71Chapter 6: Exporting and Importing Module in node.js
1-72Section 6.1: Exporting with ES6 syntax
1-73Section 6.2: Using a simple module in node.js
1-74Chapter 7: How modules are loaded
1-75Section 7.1: Global Mode
1-76Section 7.2: Loading modules
1-77Chapter 8: Cluster Module
1-78Section 8.1: Hello World
1-79Section 8.2: Cluster Example
1-80Chapter 9: Readline
1-81Section 9.1: Line-by-line file reading
1-82Section 9.2: Prompting user input via CLI
1-83Chapter 10: package.json
1-84Section 10.1: Exploring package.json
1-85Section 10.2: Scripts
1-86Section 10.3: Basic project definition
1-87Section 10.4: Dependencies
1-88Section 10.5: Extended project definition
1-89Chapter 11: Event Emitters
1-90Section 11.1: Basics
1-91Section 11.2: Get the names of the events that are subscribed to
1-92Section 11.3: HTTP Analytics through an Event Emitter
1-93Section 11.4: Get the number of listeners registered to listen for a specific event
1-94Chapter 12: Autoreload on changes
1-95Section 12.1: Autoreload on source code changes using nodemon
1-96Section 12.2: Browsersync
1-97Chapter 13: Environment
1-98Section 13.1: Accessing environment variables
1-99Section 13.2: process.argv command line arguments
1-100Section 13.3: Loading environment properties from a "property file"
1-101Section 13.4: Using dierent Properties/Configuration for dierent environments like dev, qa, staging etc
1-102Chapter 14: Callback to Promise
1-103Section 14.1: Promisifying a callback
1-104Section 14.2: Manually promisifying a callback
1-105Section 14.3: setTimeout promisified
1-106Chapter 15: Executing files or commands with Child Processes
1-107Section 15.1: Spawning a new process to execute a command
1-108Section 15.2: Spawning a shell to execute a command
1-109Section 15.3: Spawning a process to run an executable
1-110Chapter 16: Exception handling
1-111Section 16.1: Handling Exception In Node.Js
1-112Section 16.2: Unhanded Exception Management
1-113Section 16.3: Errors and Promises
1-114Chapter 17: Keep a node application constantly running
1-115Section 17.1: Use PM2 as a process manager
1-116Section 17.2: Running and stopping a Forever daemon
1-117Section 17.3: Continuous running with nohup
1-118Chapter 18: Uninstalling Node.js
1-119Section 18.1: Completely uninstall Node.js on Mac OSX
1-120Section 18.2: Uninstall Node.js on Windows
1-121Chapter 19: nvm - Node Version Manager
1-122Section 19.1: Install NVM
1-123Section 19.2: Check NVM version
1-124Section 19.3: Installing an specific Node version
1-125Section 19.4: Using an already installed node version
1-126Section 19.5: Install nvm on Mac OSX
1-127Section 19.6: Run any arbitrary command in a subshell with the desired version of node
1-128Section 19.7: Setting alias for node version
1-129Chapter 20: http
1-130Section 20.1: http server
1-131Section 20.2: http client
1-132Chapter 21: Using Streams
1-133Section 21.1: Read Data from TextFile with Streams
1-134Section 21.2: Piping streams
1-135Section 21.3: Creating your own readable/writable stream
1-136Section 21.4: Why Streams?
1-137Chapter 22: Deploying Node.js applications in production
1-138Section 22.1: Setting NODE_ENV="production"
1-139Section 22.2: Manage app with process manager
1-140Section 22.3: Deployment using process manager
1-141Section 22.4: Deployment using PM2
1-142Section 22.5: Using dierent Properties/Configuration for dierent environments like dev, qa, staging etc
1-143Section 22.6: Taking advantage of clusters
1-144Chapter 23: Securing Node.js applications
1-145Section 23.1: SSL/TLS in Node.js
1-146Section 23.2: Preventing Cross Site Request Forgery (CSRF)