Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Nest.js: A Progressive Node.js Framework
  • Table Of Contents Toc
Nest.js: A Progressive Node.js Framework

Nest.js: A Progressive Node.js Framework

By : Greg Magolan, Patrick Housley, Adrien de Peretti, Jay Bell, David Guijarro
close
close
Nest.js: A Progressive Node.js Framework

Nest.js: A Progressive Node.js Framework

By: Greg Magolan, Patrick Housley, Adrien de Peretti, Jay Bell, David Guijarro

Overview of this book

Nest.js is a modern web framework built on a Node.js Express server. With the knowledge of how to use this framework, you can give your applications an organized codebase and a well-defined structure. The book begins by showing how to use Nest.js controllers, providers, modules, bootstrapping, and middleware in your applications. You’ll learn to use the authentication feature of Node.js to manage the restriction access in your application, and how to leverage the Dependency Injection pattern to speed up your application development. As you advance through the book, you'll also see how Nest.js uses TypeORM—an Object Relational Mapping (ORM) that works with several relational databases. You’ll use Nest.js microservices to extract part of your application’s business logic and execute it within a separate Nest.js context. Toward the end of the book, you’ll learn to write tests (both unit tests as well as end-to-end ones) and how to check the percentage of the code your tests cover. By the end of this book, you’ll have all the knowledge you need to build your own Nest.js applications.
Table of Contents (16 chapters)
close
close

Chapter 10. Routing and request handling in Nest.js

Routing and request handling in Nest.js is handled by the controllers layer. Nest.js routes requests to handler methods, which are defined inside controller classes. Adding a routing decorator such as @Get() to a method in a controller tells Nest.js to create an endpoint for this route path and route every corresponding request to this handler.

In this chapter, we’ll go over the various aspects of routing and request handling in Nest.js using the EntryController from our blog application as a basis for some examples. We’ll be looking at different approaches that you can use to write request handlers, so not all examples shown will match code from our blog application.

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Nest.js: A Progressive Node.js Framework
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon