Draft:NestJS

From English Wikipedia @ Freddythechick
NestJS
Original author(s)Kamil Myśliwiec[1]
Developer(s)Open-source community[2]
Initial releaseFebruary 16, 2018; 7 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

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

Features

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

Popularity

NestJS is used by

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

Example

Handlers often need access to the client request details. Nest provides access to the request object of the underlying platform (Express by default). <syntaxhighlight lang="typescript"> 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';
 }

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

References

  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.