NodeJS Notes for Professionals book

    Amazing collection of free programming books

    收集中
    免費
    Amazing collection of free programming books

    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 Buer 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 dierent Properties/Configuration for dierent 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 dierent Properties/Configuration for dierent 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)
    1-147Section 23.3: Setting up an HTTPS server
    1-148Section 23.4: Using HTTPS
    1-149Section 23.5: Secure express.js 3 Application
    1-150Chapter 24: Mongoose Library
    1-151Section 24.1: Connect to MongoDB Using Mongoose
    1-152Section 24.2: Find Data in MongoDB Using Mongoose, Express.js Routes and $text Operator
    1-153Section 24.3: Save Data to MongoDB using Mongoose and Express.js Routes
    1-154Section 24.4: Find Data in MongoDB Using Mongoose and Express.js Routes
    1-155Section 24.5: Useful Mongoose functions
    1-156Section 24.6: Indexes in models
    1-157Section 24.7: find data in mongodb using promises
    1-158Chapter 25: async.js
    1-159Section 25.1: Parallel : multi-tasking
    1-160Section 25.2: async.each(To handle array of data eciently)
    1-161Section 25.3: Series : independent mono-tasking
    1-162Section 25.4: Waterfall : dependent mono-tasking
    1-163Section 25.5: async.times(To handle for loop in better way)
    1-164Section 25.6: async.series(To handle events one by one)
    1-165Chapter 26: File upload
    1-166Section 26.1: Single File Upload using multer
    1-167Section 26.2: Using formidable module
    1-168Chapter 27: Socket.io communication
    1-169Section 27.1: "Hello world!" with socket messages
    1-170Chapter 28: Mongodb integration
    1-171Section 28.1: Simple connect
    1-172Section 28.2: Simple connect, using promises
    1-173Section 28.3: Connect to MongoDB
    1-174Section 28.4: Insert a document
    1-175Section 28.5: Read a collection
    1-176Section 28.6: Update a document
    1-177Section 28.7: Delete a document
    1-178Section 28.8: Delete multiple documents
    1-179Chapter 29: Handling POST request in Node.js
    1-180Section 29.1: Sample node.js server that just handles POST requests
    1-181Chapter 30: Simple REST based CRUD API
    1-182Section 30.1: REST API for CRUD in Express 3+
    1-183Chapter 31: Template frameworks
    1-184Section 31.1: Nunjucks
    1-185Chapter 32: Node.js Architecture & Inner Workings
    1-186Section 32.1: Node.js - under the hood
    1-187Section 32.2: Node.js - in motion
    1-188Chapter 33: Debugging Node.js application
    1-189Section 33.1: Core node.js debugger and node inspector
    1-190Chapter 34: Node server without framework
    1-191Section 34.1: Framework-less node server
    1-192Section 34.2: Overcoming CORS Issues
    1-193Chapter 35: Node.JS with ES6
    1-194Section 35.1: Node ES6 Support and creating a project with Babel
    1-195Section 35.2: Use JS es6 on your NodeJS app
    1-196Chapter 36: Interacting with Console
    1-197Section 36.1: Logging
    1-198Chapter 37: Cassandra Integration
    1-199Section 37.1: Hello world
    1-200Chapter 38: Creating API's with Node.js
    1-201Section 38.1: GET api using Express
    1-202Section 38.2: POST api using Express
    1-203Chapter 39: Graceful Shutdown
    1-204Section 39.1: Graceful Shutdown - SIGTERM
    1-205Chapter 40: Using IISNode to host Node.js Web Apps in IIS
    1-206Section 40.1: Using an IIS Virtual Directory or Nested Application via <appSettings>
    1-207Section 40.2: Getting Started
    1-208Section 40.3: Basic Hello World Example using Express
    1-209Section 40.4: Using Socket.io with IISNode
    1-210Chapter 41: CLI
    1-211Section 41.1: Command Line Options
    1-212Chapter 42: NodeJS Frameworks
    1-213Section 42.1: Web Server Frameworks
    1-214Section 42.2: Command Line Interface Frameworks
    1-215Chapter 43: grunt
    1-216Section 43.1: Introduction To GruntJs
    1-217Section 43.2: Installing gruntplugins
    1-218Chapter 44: Using WebSocket's with Node.JS
    1-219Section 44.1: Installing WebSocket's
    1-220Section 44.2: Adding WebSocket's to your file's
    1-221Section 44.3: Using WebSocket's and WebSocket Server's
    1-222Section 44.4: A Simple WebSocket Server Example
    1-223Chapter 45: metalsmith
    1-224Section 45.1: Build a simple blog
    1-225{{ title }}
    1-226Chapter 46: Parsing command line arguments
    1-227Section 46.1: Passing action (verb) and values
    1-228Section 46.2: Passing boolean switches
    1-229Chapter 47: Client-server communication
    1-230Section 47.1: /w Express, jQuery and Jade
    1-231Chapter 48: Node.js Design Fundamental
    1-232Section 48.1: The Node.js philosophy
    1-233Chapter 49: Connect to Mongodb
    1-234Section 49.1: Simple example to Connect mongoDB from Node.JS
    1-235Section 49.2: Simple way to Connect mongoDB with core Node.JS
    1-236Chapter 50: Performance challenges
    1-237Section 50.1: Processing long running queries with Node
    1-238Chapter 51: Send Web Notification
    1-239Section 51.1: Send Web notification using GCM ( Google Cloud Messaging System)
    1-240Chapter 52: Remote Debugging in Node.JS
    1-241Section 52.1: Use the proxy for debugging via port on Linux
    1-242Section 52.2: NodeJS run configuration
    1-243Section 52.3: IntelliJ/Webstorm Configuration
    1-244Chapter 53: Database (MongoDB with Mongoose)
    1-245Section 53.1: Mongoose connection
    1-246Section 53.2: Model
    1-247Section 53.3: Insert data
    1-248Section 53.4: Read data
    1-249Chapter 54: Good coding style
    1-250Section 54.1: Basic program for signup
    1-251Chapter 55: Restful API Design: Best Practices
    1-252Section 55.1: Error Handling: GET all resources
    1-253Chapter 56: Deliver HTML or any other sort of file
    1-254Section 56.1: Deliver HTML at specified path
    1-255Chapter 57: TCP Sockets
    1-256Section 57.1: A simple TCP server
    1-257Section 57.2: A simple TCP client
    1-258Chapter 58: Hack
    1-259Section 58.1: Add new extensions to require()
    1-260Chapter 59: Bluebird Promises
    1-261Section 59.1: Converting nodeback library to Promises
    1-262Section 59.2: Functional Promises
    1-263Section 59.3: Coroutines (Generators)
    1-264Section 59.4: Automatic Resource Disposal (Promise.using)
    1-265Section 59.5: Executing in series
    1-266Chapter 60: Async/Await
    1-267Section 60.1: Comparison between Promises and Async/Await
    1-268Section 60.2: Async Functions with Try-Catch Error Handling
    1-269Section 60.3: Stops execution at await
    1-270Section 60.4: Progression from Callbacks
    1-271Chapter 61: Koa Framework v2
    1-272Section 61.1: Hello World example
    1-273Section 61.2: Handling errors using middleware
    1-274Chapter 62: Unit testing frameworks
    1-275Section 62.1: Mocha Asynchronous (async/await)
    1-276Section 62.2: Mocha synchronous
    1-277Section 62.3: Mocha asynchronous (callback)
    1-278Chapter 63: ECMAScript 2015 (ES6) with Node.js
    1-279Section 63.1: const/let declarations
    1-280Section 63.2: Arrow functions
    1-281Section 63.3: Arrow Function Example
    1-282Section 63.4: destructuring
    1-283Section 63.5: flow
    1-284Section 63.6: ES6 Class
    1-285Chapter 64: Routing AJAX requests with Express.JS
    1-286Section 64.1: A simple implementation of AJAX
    1-287Chapter 65: Sending a file stream to client
    1-288Section 65.1: Using fs And pipe To Stream Static Files From The Server
    1-289Section 65.2: Streaming Using fluent-mpeg
    1-290Chapter 66: NodeJS with Redis
    1-291Section 66.1: Getting Started
    1-292Section 66.2: Storing Key-Value Pairs
    1-293Section 66.3: Some more important operations supported by node_redis
    1-294Chapter 67: Using Browserfiy to resolve 'required' error with browsers
    1-295Section 67.1: Example - file.js
    1-296Chapter 68: Node.JS and MongoDB.
    1-297Section 68.1: Connecting To a Database
    1-298Section 68.2: Creating New Collection
    1-299Section 68.3: Inserting Documents
    1-300Section 68.4: Reading
    1-301Section 68.5: Updating
    1-302Section 68.6: Deleting
    1-303Chapter 69: Passport integration
    1-304Section 69.1: Local authentication
    1-305Section 69.2: Getting started
    1-306Section 69.3: Facebook authentication
    1-307Section 69.4: Simple Username-Password Authentication
    1-308Section 69.5: Google Passport authentication
    1-309Chapter 70: Dependency Injection
    1-310Section 70.1: Why Use Dependency Injection
    1-311Chapter 71: NodeJS Beginner Guide
    1-312Section 71.1: Hello World !
    1-313Chapter 72: Use Cases of Node.js
    1-314Section 72.1: HTTP server
    1-315Section 72.2: Console with command prompt
    1-316Chapter 73: Sequelize.js
    1-317Section 73.1: Defining Models
    1-318Section 73.2: Installation
    1-319Chapter 74: PostgreSQL integration
    1-320Section 74.1: Connect To PostgreSQL
    1-321Section 74.2: Query with Connection Object
    1-322Chapter 75: MySQL integration
    1-323Section 75.1: Connect to MySQL
    1-324Section 75.2: Using a connection pool
    1-325Section 75.3: Query a connection object with parameters
    1-326Section 75.4: Query a connection object without parameters
    1-327Section 75.5: Run a number of queries with a single connection from a pool
    1-328Section 75.6: Export Connection Pool
    1-329Section 75.7: Return the query when an error occurs
    1-330Chapter 76: MySQL Connection Pool
    1-331Section 76.1: Using a connection pool without database
    1-332Chapter 77: MSSQL Intergration
    1-333Section 77.1: Connecting with SQL via. mssql npm module
    1-334Chapter 78: Node.js with Oracle
    1-335Section 78.1: Connect to Oracle DB
    1-336Section 78.2: Using a local module for easier querying
    1-337Section 78.3: Query a connection object without parameters
    1-338Chapter 79: Synchronous vs Asynchronous programming in nodejs
    1-339Section 79.1: Using async
    1-340Chapter 80: Node.js Error Management
    1-341Section 80.1: try...catch block
    1-342Section 80.2: Creating Error object
    1-343Section 80.3: Throwing Error
    1-344Chapter 81: Node.js v6 New Features and Improvement
    1-345Section 81.1: Default Function Parameters
    1-346Section 81.2: Rest Parameters
    1-347Section 81.3: Arrow Functions
    1-348Section 81.4: "this" in Arrow Function
    1-349Section 81.5: Spread Operator
    1-350Chapter 82: Eventloop
    1-351Section 82.1: How the concept of event loop evolved
    1-352Chapter 83: Nodejs History
    1-353Section 83.1: Key events in each year
    1-354Chapter 84: passport.js
    1-355Section 84.1: Example of LocalStrategy in passport.js
    1-356Chapter 85: Asynchronous programming
    1-357Section 85.1: Callback functions
    1-358Section 85.2: Callback hell
    1-359Section 85.3: Native Promises
    1-360Section 85.4: Code example
    1-361Section 85.5: Async error handling
    1-362Chapter 86: Node.js code for STDIN and STDOUT without using any library
    1-363Section 86.1: Program
    1-364Chapter 87: MongoDB Integration for Node.js/Express.js
    1-365Section 87.1: Installing MongoDB
    1-366Section 87.2: Creating a Mongoose Model
    1-367Section 87.3: Querying your Mongo Database
    1-368Chapter 88: Lodash
    1-369Section 88.1: Filter a collection
    1-370Chapter 89: csv parser in node js
    1-371Section 89.1: Using FS to read in a CSV
    1-372Chapter 90: Loopback - REST Based connector
    1-373Section 90.1: Adding a web based connector
    1-374Chapter 91: Running node.js as a service
    1-375Section 91.1: Node.js as a systemd dæmon
    1-376Chapter 92: Node.js with CORS
    1-377Section 92.1: Enable CORS in express.js
    1-378Chapter 93: Getting started with Nodes profiling
    1-379Section 93.1: Profiling a simple node application
    1-380Chapter 94: Node.js Performance
    1-381Section 94.1: Enable gzip
    1-382Section 94.2: Event Loop
    1-383Section 94.3: Increase maxSockets
    1-384Chapter 95: Yarn Package Manager
    1-385Section 95.1: Creating a basic package
    1-386Section 95.2: Yarn Installation
    1-387Section 95.3: Install package with Yarn
    1-388Chapter 96: OAuth 2.0
    1-389Section 96.1: OAuth 2 with Redis Implementation - grant_type: password
    1-390Chapter 97: Node JS Localization
    1-391Section 97.1: using i18n module to maintains localization in node js app
    1-392Chapter 98: Deploying Node.js application without downtime.
    1-393Section 98.1: Deployment using PM2 without downtime
    1-394Chapter 99: Node.js (express.js) with angular.js Sample code
    1-395Section 99.1: Creating our project
    1-396Chapter 100: NodeJs Routing
    1-397Section 100.1: Express Web Server Routing
    1-398Chapter 101: Creating a Node.js Library that Supports Both Promises and Error-First Callbacks
    1-399Section 101.1: Example Module and Corresponding Program using Bluebird
    1-400Chapter 102: Project Structure
    1-401Section 102.1: A simple nodejs application with MVC and API
    1-402Chapter 103: Avoid callback hell
    1-403Section 103.1: Async module
    1-404Section 103.2: Async Module
    1-405Chapter 104: Arduino communication with nodeJs
    1-406Section 104.1: Node Js communication with Arduino via serialport
    1-407Chapter 105: N-API
    1-408Section 105.1: Hello to N-API
    1-409Chapter 106: Multithreading
    1-410Section 106.1: Cluster
    1-411Section 106.2: Child Process
    1-412Chapter 107: Windows authentication under node.js
    1-413Section 107.1: Using activedirectory
    1-414Chapter 108: Require()
    1-415Section 108.1: Beginning require() use with a function and file
    1-416Section 108.2: Beginning require() use with an NPM package
    1-417Chapter 109: Route-Controller-Service structure for ExpressJS
    1-418Section 109.1: Model-Routes-Controllers-Services Directory Structure
    1-419Section 109.2: Model-Routes-Controllers-Services Code Structure
    1-420Chapter 110: Push notifications
    1-421Section 110.1: Web notification
    1-422Section 110.2: Apple
    1-423Appendix A: Installing Node.js
    1-424Section A.1: Using Node Version Manager (nvm)
    1-425Section A.2: Installing Node.js on Mac using package manager
    1-426Section A.3: Installing Node.js on Windows
    1-427Section A.4: Install Node.js on Ubuntu
    1-428Section A.5: Installing Node.js with n
    1-429Section A.6: Install Node.js From Source with APT package manager
    1-430Section A.7: Install Node.js from source on Centos, RHEL and Fedora
    1-431Section A.8: Installing with Node Version Manager under Fish Shell with Oh My Fish!
    1-432Section A.9: Installing Node.js on Raspberry PI
    1-433Credits
    1-434You may also like

    常見問答

    您可以透過手機、平板或是電腦登入 HiSKIO 平台,在【我的學習】>【我的書籍】頁面,選擇想看的電子書。

    猜你喜歡

    用戶評價

    | 收集中

    銷售方案