What is NestJS?
Full stack MVC development framework for NodeJS. Give you the framework to spin up a NodeJS backend API, microservice, or full-stack website with common integrations for GraphQL and Web Sockets. Uses model, view, and controller architecture for structuring apps.
Like Laravel, if someone was a fan of Angular and JS decorators, with more open wrappers around underlying libraries (like Express/Fastify for routing).
Big on "dependency injection", meaning the app won't import your library unless you explicitly inject it into the app:
Why use NestJS?
- Simplifies development with things like decorators.
- Frontend agnostic (can use as backend with React/Vue/etc)
- Express/Fastify (uses Express by default)
- GraphQL (wrapper around Apollo)
- Web Sockets
- Supports socket.io and ws
- First class Typescript support
- Unit testing using Jest
- E2E testing
How do I use NestJS?
- Make sure NodeJS is installed.
- Setup a new project with CLI (or clone template). See getting started docs here.