Node.js

The Comprehensive Guide
Sofort lieferbar | Lieferzeit: Sofort lieferbar I
ISBN-13:
9781493222926
Veröffentl:
2023
Erscheinungsdatum:
06.01.2023
Seiten:
834
Autor:
Sebastian Springer
Gewicht:
1458 g
Format:
253x178x42 mm
Serie:
Rheinwerk Computing
Sprache:
Englisch
Beschreibung:

If you're developing server-side JavaScript applications, you need Node.js! Start with the basics of the Node.js environment: installation, application structure, and modules. Then follow detailed code examples to learn about web development using frameworks like Express and Nest. Learn about different approaches to asynchronous programming, including RxJS and data streams. Details on peripheral topics such as testing, security, and performance make this your all-in-one daily reference for Node.js!In this book, you'll learn about:a. Getting Started with Node.js Begin your journey with Node.js. Learn about the core components of the environment such as the V8 engine and libraries. Then install Node.js and explore application development tools and the module system. b. Developing Applications Develop web applications by following practical code examples. Set up a web server using HTTP and develop apps step by step using the Express and Nest frameworks. Connect databases, generate interfaces using the REST server and GraphQL, implement command-line tools, handle asynchronous programming, and more. c. Managing ApplicationsManage your Node.js applications from development to deployment. Learn how to use package managers, implement tests, and protect against security threats. Get expert tips on scalability and performance to optimize your apps. Highlights include:1) Installation2) Asynchronous programming3) Application development 4) Modules 5) Express and Nest frameworks6) Template engines 7) Database connectivity 8) Web sockets9) Session handling10) Deployment and operations11) Security 12) Testing, performance, and scalability
Debug, scale, test, and optimize your applications
... Foreword ... 25... Preface ... 27... Structure of the Book ... 28... Downloading the Code Samples ... 29... Acknowledgments ... 301 ... Basic Principles ... 311.1 ... The Story of Node.js ... 331.2 ... Organization of Node.js ... 371.3 ... Versioning of Node.js ... 381.4 ... Benefits of Node.js ... 401.5 ... Areas of Use for Node.js ... 401.6 ... The Core: V8 Engine ... 411.7 ... Libraries around the Engine ... 471.8 ... Summary ... 532 ... Installation ... 552.1 ... Installing Packages ... 562.2 ... Compiling and Installing ... 682.3 ... Node Version Manager ... 712.4 ... Node and Docker ... 712.5 ... Summary ... 723 ... Developing Your First Application ... 733.1 ... Interactive Mode ... 733.2 ... The First Application ... 793.3 ... Debugging Node.js Applications ... 883.4 ... nodemon Development Tool ... 983.5 ... Summary ... 994 ... Node.js Modules ... 1014.1 ... Modular Structure ... 1014.2 ... Core Modules ... 1034.3 ... JavaScript Module Systems ... 1214.4 ... Creating and Using Your Own Modules ... 1244.5 ... Summary ... 1355 ... HTTP ... 1375.1 ... Web Server ... 1375.2 ... Node.js as HTTP Client ... 1645.3 ... Secure Communication with HTTPS ... 1685.4 ... HTTP/2 ... 1705.5 ... Summary ... 1756 ... Express ... 1776.1 ... Structure ... 1776.2 ... Installation ... 1786.3 ... Basic Principles ... 1796.4 ... Setup ... 1816.5 ... Movie Database ... 1856.6 ... Middleware ... 1936.7 ... Extended Routing: Deleting Data Records ... 1996.8 ... Creating and Editing Data Records: Body Parser ... 2016.9 ... Express 5 ... 2086.10 ... HTTPS and HTTP/2 ... 2096.11 ... Summary ... 2127 ... Template Engines ... 2137.1 ... Custom Template Engine ... 2147.2 ... Template Engines in Practice: Pug ... 2157.3 ... Handlebars ... 2297.4 ... Summary ... 2398 ... Connecting Databases ... 2418.1 ... Node.js and Relational Databases ... 2428.2 ... Node.js and Nonrelational Databases ... 2608.3 ... Summary ... 2729 ... Authentication and Session Handling ... 2739.1 ... Passport ... 2739.2 ... Setup and Configuration ... 2749.3 ... Logging In to the Application ... 2779.4 ... Accessing Resources ... 2859.5 ... Summary ... 29410 ... REST Server ... 29510.1 ... Introduction to REST and Usage in Web Applications ... 29510.2 ... Accessing the Application ... 29610.3 ... Adaptations to the Application Structure ... 29710.4 ... Read Requests ... 29810.5 ... Write Requests ... 30910.6 ... Authentication via JWTs ... 31610.7 ... OpenAPI Specification: Documentation with Swagger ... 32410.8 ... Validation ... 32910.9 ... Summary ... 33511 ... GraphQL ... 33711.1 ... GraphQL Libraries ... 33811.2 ... Integration with Express ... 33911.3 ... GraphiQL ... 34111.4 ... Reading Data via the Interface ... 34211.5 ... Write Accesses to the GraphQL Interface ... 34711.6 ... Authentication for the GraphQL Interface ... 35311.7 ... Summary ... 35512 ... Real-Time Web Applications ... 35712.1 ... The Sample Application ... 35812.2 ... Setup ... 35812.3 ... WebSockets ... 36412.4 ... Socket.IO ... 37712.5 ... Summary ... 38313 ... Type-Safe Applications in Node.js ... 38513.1 ... Type Systems for Node.js ... 38613.2 ... Tools and Configuration ... 39213.3 ... Basic Principles ... 39813.4 ... Classes ... 40313.5 ... Interfaces ... 40613.6 ... Type Aliases in TypeScript ... 40813.7 ... Generics ... 40913.8 ... TypeScript in Use in a Node.js Application ... 41013.9 ... Summary ... 41214 ... Web Applications with Nest ... 41314.1 ... Installation and Getting Started with Nest ... 41414.2 ... Nest Command-Line Interface ... 41614.3 ... Structure of the Application ... 41914.4 ... Modules: Logical Units in the Source Code ... 42114.5 ... Controllers: Endpoints of an Application ... 42314.6 ... Providers: Business Logic of the Application ... 42814.7 ... Accessing Databases ... 43214.8 ... Documenting the Endpoints with OpenAPI ... 43914.9 ... Authentication ... 44214.10 ... Outlook: Testing in Nest ... 44914.11 ... Summary ... 45115 ... Node on the Command Line ... 45315.1 ... Basic Principles ... 45315.2 ... Structure of a Command-Line Application ... 45615.3 ... Accessing Input and Output ... 46115.4 ... Tools ... 46915.5 ... Signals ... 47615.6 ... Exit Codes ... 47815.7 ... Summary ... 47916 ... Asynchronous Programming ... 48116.1 ... Basic Principles of Asynchronous Programming ... 48116.2 ... Running External Commands Asynchronously ... 48616.3 ... Creating Node.js Child Processes with fork Method ... 49216.4 ... The cluster Module ... 49616.5 ... Worker Threads ... 50416.6 ... Promises in Node.js ... 50716.7 ... Async Functions ... 51416.8 ... Summary ... 51717 ... RxJS ... 51917.1 ... Basic Principles ... 52017.2 ... Operators ... 52517.3 ... Subjects ... 54017.4 ... Schedulers ... 54217.5 ... Summary ... 54318 ... Streams ... 54518.1 ... Introduction ... 54518.2 ... Readable Streams ... 54818.3 ... Writable Streams ... 55918.4 ... Duplex Streams ... 56618.5 ... Transform Streams ... 56818.6 ... Gulp ... 57018.7 ... Summary ... 57219 ... Working with Files ... 57319.1 ... Synchronous and Asynchronous Functions ... 57319.2 ... Existence of Files ... 57519.3 ... Reading Files ... 57619.4 ... Error Handling ... 58219.5 ... Writing to Files ... 58219.6 ... Directory Operations ... 58619.7 ... Advanced Operations ... 58919.8 ... Summary ... 59420 ... Socket Server ... 59520.1 ... Unix Sockets ... 59620.2 ... Windows Pipes ... 60220.3 ... TCP Sockets ... 60320.4 ... UDP Sockets ... 61020.5 ... Summary ... 61421 ... Package Manager ... 61521.1 ... Most Common Operations ... 61621.2 ... Advanced Operations ... 62721.3 ... Tools for Node Package Manager ... 63421.4 ... Yarn ... 63721.5 ... Summary ... 63822 ... Quality Assurance ... 64122.1 ... Style Guides ... 64222.2 ... Linter ... 64322.3 ... Prettier ... 64822.4 ... Programming Mistake Detector: Copy/Paste Detector ... 64922.5 ... Husky ... 65222.6 ... Summary ... 65323 ... Testing ... 65523.1 ... Unit Testing ... 65523.2 ... Assertion Testing ... 65823.3 ... Jasmine ... 66323.4 ... Jest ... 67123.5 ... Practical Example of Unit Tests with Jest ... 67423.6 ... Dealing with Dependencies: Mocking ... 67923.7 ... Summary ... 68124 ... Security ... 68324.1 ... Filter Input and Escape Output ... 68424.2 ... Protecting the Server ... 68624.3 ... Node Package Manager Security ... 70424.4 ... Client Protection ... 70724.5 ... Summary ... 71125 ... Scalability and Deployment ... 71325.1 ... Deployment ... 71325.2 ... Tool Support ... 72025.3 ... Scaling ... 72125.4 ... pm2: Process Management ... 73025.5 ... Docker ... 73025.6 ... Summary ... 73226 ... Performance ... 73326.1 ... You Aren¿t Gonna Need It ... 73326.2 ... CPU ... 73426.3 ... Memory ... 74126.4 ... Network ... 74726.5 ... Summary ... 75127 ... Microservices with Node.js ... 75327.1 ... Basic Principles ... 75327.2 ... Architecture ... 75627.3 ... Infrastructure ... 75827.4 ... Asynchronous Microservice with RabbitMQ ... 75927.5 ... API Gateway ... 76827.6 ... Synchronous Microservice with Express ... 78027.7 ... Summary ... 78928 ... Deno ... 79128.1 ... The Ten Things Ryan Dahl Regrets about Node.js ... 79128.2 ... Installing Deno ... 79328.3 ... Execution ... 79528.4 ... Handling Files ... 79628.5 ... Web Server with Deno ... 80328.6 ... Module System ... 80428.7 ... Summary ... 809... The Author ... 811... Index ... 813

Kunden Rezensionen

Zu diesem Artikel ist noch keine Rezension vorhanden.
Helfen sie anderen Besuchern und verfassen Sie selbst eine Rezension.

Google Plus
Powered by Inooga