Building a Microservice

Now that we've seen some examples of building microservices using some tools, let's dig deeper and create a microservice from scratch using these tools. To accomplish our goal, we'll first use Express, then see how we could refactor it using Hydra, and finally, we'll create our microservice using the Seneca approach.

There are many microservices we could create, but some are more interesting than others. More specifically, a microservice that you can use in several applications is obviously more useful.

Let's create an image processing microservice. We'll start with a simple thumbnail service, and then we'll evolve to make some simple image transformations. We'll be covering how to:

  • Build a microservice using Express
  • Use external modules to manipulate images
  • Build our previous microservice in Hydra and Seneca

The microservice name is very important, as it gives identity. Let's name it imagini, the Latin name for image.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset