2 Creating your first microservice

 

This chapter covers

  • Our philosophy of development
  • Establishing a single-service development environment
  • Building a microservice for video streaming
  • Setting up for production and development
  • Using Node.js to run our microservice

Our goal for this book is to assemble an application that consists of multiple microservices. But before we can build multiple microservices, we must first learn how to build a single microservice.

Because we have to start somewhere, in this chapter, we’ll create our first microservice. It’s a simple microservice, doing very little, but it illustrates the process so that you can understand it and repeat it. Indeed, it is the process we’ll use to create multiple microservices through the course of the book.

This first microservice is a simple HTTP server that delivers streaming video to a user watching in a web browser. This is the first step on our road to building FlixTube, our video-streaming application. Video streaming might sound difficult, but the simple code we examine at this stage should not present much trouble.

In this book, our microservices are programmed with JavaScript and run on Node.js. It’s important to note, though, that we could use any tech stack for our microservices. Building applications with microservices gives us a lot of freedom in the tech stack we use.

2.1 New tools

 
 

2.2 Getting the code

 

2.3 Why Node.js?

 
 
 

2.4 Our philosophy of development

 
 
 
 

2.5 Establishing our single-service development environment

 
 

2.5.1 Installing Git

 
 
 

2.5.2 Cloning the code repo

 
 
 
 

2.5.3 Getting Visual Studio (VS) Code

 
 
 

2.5.4 Installing Node.js

 

2.6 Building an HTTP server for video streaming

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest