Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@nestjs/core
Advanced tools
The @nestjs/core package is the core foundation of the NestJS framework, a framework for building efficient, reliable and scalable server-side applications. It provides out-of-the-box application architecture which allows developers and teams to create highly testable, scalable, loosely coupled, and easily maintainable applications.
Module System
NestJS uses a module system to organize code into separate modules. This code sample demonstrates how to define a basic module in NestJS.
import { Module } from '@nestjs/common';
@Module({
imports: [],
controllers: [],
providers: [],
})
export class AppModule {}
Dependency Injection
NestJS provides a powerful dependency injection system, allowing classes to define their dependencies through the constructor. This code sample shows how to inject a service into another.
import { Injectable } from '@nestjs/common';
@Injectable()
export class MyService {
constructor(private otherService: OtherService) {}
}
Controllers and Routing
NestJS allows for easy setup of controllers and routing. This code sample demonstrates defining a controller with a single route that returns a simple string.
import { Controller, Get } from '@nestjs/common';
@Controller('my-route')
export class MyController {
@Get()
getHello(): string {
return 'Hello World!';
}
}
Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. While it is less opinionated than NestJS, requiring more manual setup for structure and architecture, it serves as the underlying HTTP server framework for NestJS.
Fastify is a fast and low overhead web framework for Node.js. It is designed to be as efficient and fast as possible, similar to Express but with a focus on speed and performance. NestJS can use Fastify as an alternative HTTP server to Express, offering developers a choice based on their performance needs.
Hapi is a rich framework for building applications and services, offering a powerful plugin system. It is designed to be more configurable and extensible than Express, providing a robust set of features out of the box. While it shares some similarities with NestJS in terms of offering a structured approach to application development, it does not enforce a specific architecture or dependency injection system.
A progressive Node.js framework for building efficient and scalable server-side applications.
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses modern JavaScript, is built with TypeScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
Under the hood, Nest makes use of Express, but also, provides compatibility with a wide range of other libraries, like e.g. Fastify, allowing for easy use of the myriad third-party plugins which are available.
In recent years, thanks to Node.js, JavaScript has become the “lingua franca” of the web for both front and backend applications, giving rise to awesome projects like Angular, React and Vue which improve developer productivity and enable the construction of fast, testable, extensible frontend applications. However, on the server-side, while there are a lot of superb libraries, helpers and tools for Node, none of them effectively solve the main problem - the architecture.
Nest aims to provide an application architecture out of the box which allows for effortless creation of highly testable, scalable, loosely coupled and easily maintainable applications. The architecture is heavily inspired by Angular.
For questions and support please use the official Discord channel. The issue list of this repo is exclusively for bug reports and feature requests.
Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about support here.
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support from the amazing backers. If you'd like to join them, please read more here.
Nest is MIT licensed.
FAQs
Nest - modern, fast, powerful node.js web framework (@core)
The npm package @nestjs/core receives a total of 2,804,459 weekly downloads. As such, @nestjs/core popularity was classified as popular.
We found that @nestjs/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.