JavaScript in Action
JavaScript in Action
Summary:
The book "JavaScript in Action" is a practical guide to modern JavaScript programming using the Node.js platform. Unlike classic textbooks that focus on browser-based JavaScript, this book immerses the reader in server-side development, working with the file system, network requests, and asynchronous programming.
The book is intended for beginner developers who have already mastered the basics of JavaScript syntax (variables, functions, loops) and want to move on to creating real applications. It will also be useful for those familiar with other languages (Python, Java, C#) and who want to quickly learn Node.js.
The reader will learn: how the event-driven model of Node.js works, how to manage asynchronous operations using callbacks, promises, and async/await, how to create web servers and REST APIs with Express.js, how to work with databases (MongoDB, PostgreSQL), how to handle errors and log applications, and how to test code using Jest and Mocha.
Chapter contents:
1. Introduction to Node.js and environment setup
2. Module system and npm
3. Asynchronous programming: callbacks, promises, async/await
4. Creating a web server with vanilla Node.js
5. Express.js framework: routing, middleware, error handling
6. Working with databases (MongoDB via Mongoose)
7. Authentication and authorization (JWT, sessions)
8. Application testing (unit tests, integration tests)
9. Application deployment (Docker, Heroku, VPS)
10. Creating a real-time chat application (Socket.IO)
Why you should read it: the book is written in a lively language, contains many code examples that can be run immediately. Each chapter ends with a practical assignment. The author shares real-world cases from commercial development, which helps avoid typical beginner mistakes. This is one of the few books that simultaneously covers both the theory of asynchrony and the practice of creating full-fledged web applications.