O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Bacon.js

Bacon.js is a small, compact functional reactive programming library. When integrated with Node.js, you can easily turn your spaghetti code into clean, declarative code. It has more than 29,000 downloads a month. At the time of writing, the version available was 1.0.0. Let's have a quick hands on. In order to install Bacon.js, we need to install Bacon.js and its typings. Open up a Terminal and shoot npm install baconjs --save and npm install @types/baconjs --only=dev. Now, let's see one basic example where we will see how clean the code looks. We have one JSON object where some products are mapped with a number 1 for mobile, 2 for tv, and so on. We create one service to return the product name and if the product is not there, it ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required