Book Image

TypeScript Microservices

Book Image

TypeScript Microservices

Overview of this book

In the last few years or so, microservices have achieved the rock star status and right now are one of the most tangible solutions in enterprises to make quick, effective, and scalable applications. The apparent rise of Typescript and long evolution from ES5 to ES6 has seen lots of big companies move to ES6 stack. If you want to learn how to leverage the power of microservices to build robust architecture using reactive programming and Typescript in Node.js, then this book is for you. Typescript Microservices is an end-to-end guide that shows you the implementation of microservices from scratch; right from starting the project to hardening and securing your services. We will begin with a brief introduction to microservices before learning to break your monolith applications into microservices. From here, you will learn reactive programming patterns and how to build APIs for microservices. The next set of topics will take you through the microservice architecture with TypeScript and communication between services. Further, you will learn to test and deploy your TypeScript microservices using the latest tools and implement continuous integration. Finally, you will learn to secure and harden your microservice. By the end of the book, you will be able to build production-ready, scalable, and maintainable microservices using Node.js and Typescript.
Table of Contents (17 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Deployment


Releasing an application in a production environment with sufficient confidence that it is not going to crash or lose organization money is a developers dream. Even a manual error, such as not loading proper configuration files, can cause huge problems. In this section, we will see how to automate most things and become aware of continuous integration and continuous delivery (CI and CD). Let's get started with understanding the overall build pipeline.

Deciding release plan

While it is good to have confidence, it is bad to have overconfidence. We should always be ready for rolling back the new changes in case of major critical issues while deploying to production. An overall build pipeline is needed as it helps us to plan for the overall process. We will adopt this technique while doing a production build:

Build pipeline

The overall build process begins by the Start block. Whenever any commit occurs, WebHooks (provided by both Bitbucket and GitHub) trigger the build pipeline. Bitbucket...