Prix bas
CHF59.20
Habituellement expédié sous 1 à 2 semaines.
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 Highlights: Installation Asynchronous programming Application development Modules Express and Nest.js frameworks Template engines Database connectivity Web sockets Session handling Deployment and operations Security Testing, performance, and scalability
Debug, scale, test, and optimize your applications
Auteur
Sebastian Springer is a JavaScript engineer at MaibornWolff. In addition to developing and designing both client-side and server-side JavaScript applications, he focuses on imparting knowledge. As a lecturer for JavaScript, a speaker at numerous conferences, and an author, he inspires enthusiasm for professional development with JavaScript. Sebastian was previously a team leader at Mayflower GmbH, one of the premier web development agencies in Germany. He was responsible for project and team management, architecture, and customer care for companies such as Nintendo Europe, Siemens, and others.
Contenu
... Foreword ... 25
... Preface ... 27
... Structure of the Book ... 28
... Downloading the Code Samples ... 29
... Acknowledgments ... 30
1 ... Basic Principles ... 31
1.1 ... The Story of Node.js ... 33
1.2 ... Organization of Node.js ... 37
1.3 ... Versioning of Node.js ... 38
1.4 ... Benefits of Node.js ... 40
1.5 ... Areas of Use for Node.js ... 40
1.6 ... The Core: V8 Engine ... 41
1.7 ... Libraries around the Engine ... 47
1.8 ... Summary ... 53
2 ... Installation ... 55
2.1 ... Installing Packages ... 56
2.2 ... Compiling and Installing ... 68
2.3 ... Node Version Manager ... 71
2.4 ... Node and Docker ... 71
2.5 ... Summary ... 72
3 ... Developing Your First Application ... 73
3.1 ... Interactive Mode ... 73
3.2 ... The First Application ... 79
3.3 ... Debugging Node.js Applications ... 88
3.4 ... nodemon Development Tool ... 98
3.5 ... Summary ... 99
4 ... Node.js Modules ... 101
4.1 ... Modular Structure ... 101
4.2 ... Core Modules ... 103
4.3 ... JavaScript Module Systems ... 121
4.4 ... Creating and Using Your Own Modules ... 124
4.5 ... Summary ... 135
5 ... HTTP ... 137
5.1 ... Web Server ... 137
5.2 ... Node.js as HTTP Client ... 164
5.3 ... Secure Communication with HTTPS ... 168
5.4 ... HTTP/2 ... 170
5.5 ... Summary ... 175
6 ... Express ... 177
6.1 ... Structure ... 177
6.2 ... Installation ... 178
6.3 ... Basic Principles ... 179
6.4 ... Setup ... 181
6.5 ... Movie Database ... 185
6.6 ... Middleware ... 193
6.7 ... Extended Routing: Deleting Data Records ... 199
6.8 ... Creating and Editing Data Records: Body Parser ... 201
6.9 ... Express 5 ... 208
6.10 ... HTTPS and HTTP/2 ... 209
6.11 ... Summary ... 212
7 ... Template Engines ... 213
7.1 ... Custom Template Engine ... 214
7.2 ... Template Engines in Practice: Pug ... 215
7.3 ... Handlebars ... 229
7.4 ... Summary ... 239
8 ... Connecting Databases ... 241
8.1 ... Node.js and Relational Databases ... 242
8.2 ... Node.js and Nonrelational Databases ... 260
8.3 ... Summary ... 272
9 ... Authentication and Session Handling ... 273
9.1 ... Passport ... 273
9.2 ... Setup and Configuration ... 274
9.3 ... Logging In to the Application ... 277
9.4 ... Accessing Resources ... 285
9.5 ... Summary ... 294
10 ... REST Server ... 295
10.1 ... Introduction to REST and Usage in Web Applications ... 295
10.2 ... Accessing the Application ... 296
10.3 ... Adaptations to the Application Structure ... 297
10.4 ... Read Requests ... 298
10.5 ... Write Requests ... 309
10.6 ... Authentication via JWTs ... 316
10.7 ... OpenAPI Specification: Documentation with Swagger ... 324
10.8 ... Validation ... 329
10.9 ... Summary ... 335
11 ... GraphQL ... 337
11.1 ... GraphQL Libraries ... 338
11.2 ... Integration with Express ... 339
11.3 ... GraphiQL ... 341
11.4 ... Reading Data via the Interface ... 342
11.5 ... Write Accesses to the GraphQL Interface ... 347
11.6 ... Authentication for the GraphQL Interface ... 353
11.7 ... Summary ... 355
12 ... Real-Time Web Applications ... 357
12.1 ... The Sample Application ... 358
12.2 ... Setup ... 358
12.3 ... WebSockets ... 364
12.4 ... Socket.IO ... 377
12.5 ... Summary ... 383
13 ... Type-Safe Applications in Node.js ... 385
13.1 ... Type Systems for Node.js ... 386
13.2 ... Tools and Configuration ... 392
13.3 ... Basic Principles ... 398
13.4 ... Classes ... 403
13.5 ... Interfaces ... 406
13.6 ... Type Aliases in TypeScript ... 408
13.7 ... Generics ... 409
13.8 ... TypeScript in Use in a Node.js Application ... 410
13.9 ... Summary ... 412
14 ... Web Applications with Nest ... 413
14.1 ... Installation and Getting Started with Nest ... 414
14.2 ... Nest Command-Line Interface ... 416
14.3 ... Structure of the Application ... 419
14.4 ... Modules: Logical Units in the Source Code ... 421
14.5 ... Controllers: Endpoints of an Application ... 423
14.6 ... Providers: Business Logic of the Application ... 428
14.7 ... Accessing Databases ... 432
14.8 ... Documenting the Endpoints with OpenAPI ... 439
14.9 ... Authentication ... 442
14.10 ... Outlook: Testing in Nest ... 449
14.11 ... Summary ... 451
15 ... Node on the Command Line ... 453
15.1 ... Basic Principles ... 453
15.2 ... Structure of a Command-Line Application ... 456
15.3 ... Accessing Input and Output ... 461
15.4 ... Tools ... 469
15.5 ... Signals ... 476
15.6 ... Exit Codes ... 478
15.7 ... Summary ... 479
16 ... Asynchronous Programming ... 481
16.1 ... Basic Principles of Asynchronous Programming ... 481
16.2 ... Running External Comman…