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

src/service-layer

This folder includes the processes for establishing API endpoints in the form of routes, which will handle all responses to data requests. It has the following folders:

  • controllers: This serves as a primer for processing any data requests associated with routes. The custom controllers are featured by npm module routing-controllers (https://www.npmjs.com/package/routing-controllers) using in-built decorators, such as @Get, @Put, @Delete, @Param, and so on. These functions implement basic GET, POST, DELETE, and PUT methods for transacting with the database via the RESTful API. We can even have socket initialization code and more. We will use dependency injection to inject some services which will be used here.
  • request: This ...

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