Build, test, and deploy robust microservices in JavaScript
Diogo Resende

#Microservices
#Node.js
#JavaScript
#C#
This book is an end-to-end guide on how to split your monolithic Node.js application into several microservices. We'll cover some of the toolkits available, such as Express, Hydra, and Seneca, and create a simple microservice. We'll introduce you to continuous integration using Mocha to add a test suite, we'll use chai to test the HTTP interface, and we'll use nyc to see the test coverage.
We'll cover the concept of containers and use Docker to make our first deployment. We'll then use other tools, such as Docker Swarm, to help us to scale our service. We'll see how to do the same using Kubernetes, both locally and be using Google Cloud Platform, always using the same minimal microservice architecture and with minimal changes to the code.
Who this book is for
The book is targeted at people who know the basics of Node.js and want to enter the world of microservices, get to know its advantages and techniques, and understand why it's so popular. It can also be useful for developers in other similar programming languages, such as Java or C#.
What this book covers
Chapter 1, Age of Microservices, covers the evolution of computing and how development has changed and shifted from paradigm to paradigm depending on processing capacity and user demand, ultimately resulting in the age of microservices.
Chapter 2, Modules and Toolkits, introduces you to some modules that help you create a microservice, detailing different approaches: from very raw and simple modules, such as Micro and Express, to full toolkits, such as Hydra and Seneca.
Chapter 3, Building a Microservice, covers the development of a simple microservice using the most common module, Express, with a very simple HTTP interface.
Chapter 4, State and Security, covers the development of our microservice: from using the server filesystem to moving to a more structured database service, such as MySQL. Chapter 5, Testing, shows how to use Mocha and chai to add test coverage to our previous microservice.
Chapter 6, Deploying Microservices, introduces you to Docker and helps you create a container image to use to run our microservice.
Chapter 7, Scaling, Sharding, and Replicating, covers the concept of replication when using Docker Swarm and Kubernetes locally to scale our microservice.
Chapter 8, Cloud-Native Microservices, shows how to migrate our microservice from the local Kubernetes to Google Cloud Platform, as an example of a fully cloud-native microservice.
Chapter 9, Design Patterns, enumerates some of the most common architectural design patterns and reviews the continuous integration and deployment loop used throughout the book.
Table of Contents
Chapter 1: The Age of Microservices
Chapter 2: Modules and Toolkits
Chapter 3: Building a Microservice
Chapter 4: State and Security
Chapter 5: Testing
Chapter 6: Deploying Microservices
Chapter 7: Scaling, Sharding, and Replicating
Chapter 8: Cloud-Native Microservices
Chapter 9: Design Patterns
About the Author
Diogo Resende is a developer with more than 15 years of experience, working with Node.js almost from the beginning. His computer education and experience in many industry and telecommunication projects have given him a wider background knowledge of other architecture components that influence the overall performance.









