Writing your first Hello World microservice

Let's start by writing our first microservice. Based on the previous topics, we will construct our first microservice with best practices and the widely used node_modules. We will use:

CORS (https://www.npmjs.com/package/cors)

Adds CORS headers, so that cross applications can access it.

Routing Controllers (https://www.npmjs.com/package/routing-controllers)

Beautiful decorators provided in this module, which help us to write our API's and routes easily.

Winston (https://www.npmjs.com/package/winston)

Perfect logging module with many advanced features.

So, open up a Terminal and create one Node project with a default package.json. Follow these steps. The full source code for reference ...

Get TypeScript Microservices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.