Draft:NestJS

From Wikipedia, the free encyclopedia
NestJS
Original author(s)Kamil Myśliwiec[1]
Developer(s)Open-source community[2]
Initial releaseFebruary 16, 2018; 6 years ago (2018-02-16)[3]
Repositorygithub.com/nestjs/nest
Written inJavaScript, TypeScript, and Rust
PlatformNode.js, Web platform
Size17.0 MB
TypeWeb application framework
LicenseMIT License
Websitenestjs.com

NestJS is a dynamic & backend web application Node.js framework [1] It is mainly designed for building web applications and APIs.

History[edit]

NestJS is an MIT-licensed open source project.[5]

Features[edit]

  • Robust,
  • Powerful,
  • Scalable server-side applications,
  • Stop reinventing the wheel.

Popularity[edit]

NestJS is used by

  • GitLab,
  • Red Hat,
  • BNW,
  • IBM[6]

Example[edit]

Handlers often need access to the client request details. Nest provides access to the request object of the underlying platform (Express by default).

import { Controller, Get, Req } from '@nestjs/common';
import { Request } from 'express';

@Controller('cats')
export class CatsController {
  @Get()
  findAll(@Req() request: Request): string {
    return 'This action returns all cats';
  }
}

We can access the request object by instructing Nest to inject it by adding the @Req() decorator to the handler's signature.

References[edit]

  1. ^ Asay, Matt (21 April 2020). "How Next.js aims to simplify front-end development". TechRepublic. Retrieved 2020-10-20.
  2. ^ "nestjs". GitHub. Retrieved 2019-03-17.
  3. ^ "Next.js First Release". GitHub. 2019-03-14. Retrieved 2019-03-17.
  4. ^ "Next.js v10.3.6". GitHub. 2019-03-14. Retrieved 2024-03-17.
  5. ^ "Support us". Retrieved 11 April 2024.
  6. ^ "Who is using Nest?". Retrieved 11 March 2024.