The main objectives of this article are: Create A Get By Id HTTP Get Endpoint In NestJS. Create A HTTP Put Endpoint In NestJS. Consume NestJS HTTP Put Endpoint From The ReactJS Create A Get By Id HTTP Get Endpoint In NestJS: Let's create a get by id HTTP Get Endpoint. This endpoint is generally to fetch the record that needs to be edited. In our 'EmployeeService' let's implement logic to fetch a document by the 'id' value. NestJS_App/src/employee/employee.service.ts: import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; import { Model } from 'mongoose'; import { Employee, EmployeeDocument } from './schema/employee-schema'; // existing code hidden for display purpose @Injectable() export class EmployeeService { constructor( @InjectModel(Employee.name) private employeeModel: Model<EmployeeDocument>, ) {} async getByid(id: string) { return await this.employeeModel.findById