Preface
Hello world! Node.js for Beginners is a book designed with a specific goal in mind: to take you from zero to deployment as quickly as possible while building a real application that reinforces the lessons from every chapter.
Node.js has been a leading technology for many years, and while there are numerous resources available to learn from, this book takes a unique approach. The knowledge you gain here will remain relevant even if you decide to change parts of your tech stack. Let me illustrate this now with an example.
Throughout the book, we use MongoDB, a non-relational database, to build our project. You might wonder how to adapt the project if you prefer using PostgreSQL, for instance. The approach I’ve taken in writing this book will make such transitions smoother. You’ll have unit tests and a clear interface to manage these changes seamlessly. I wrote a dedicated chapter to introduce testing with the Node.js API and using third party libraries such as Jest or supertest and we integrate tests as a security net that allows us to refactor the code without fear.
I’ve written this book from the perspective of 2024, thinking about what I wish I had been taught when I was new to Node.js.
The book covers the wide range of challenges you’ll encounter while building a web application, from REST API design principles to security and proper application distribution with Docker, continuous integration, and much more.
It’s a consolidation of what I’ve been teaching my students and sharing with the community for the last decade. I hope you’ll find it as enjoyable to read as I found it to write.
Also, at the end of every chapter, you will find additional resources that will help you explore more deeply and learn the concepts that are most relevant to you.