
Install node.js and npm, install visual studio code, configure the code command in path, install the NestJS CLI globally, verify versions, and prepare to create a NestJS project.
Create your first NestJS application by running nest new, select npm, and start the dev server to see hello world on localhost:3000; explore modules, controllers, and decorators.
Explore soft deletes with isActive and discontinued, and implement delete by id in a NestJS sample, removing an array element with splice while testing via Postman.
Understand nest middleware runs before controllers, mirroring express. It can modify request or response and uses next() to continue, implemented as a function or injectable class for logging and auth.
Learn to create a custom exception hierarchy in NestJS, extend the base http exception, and throw a file not found exception to produce precise error responses in JSON.
Learn to build and apply custom exception filters in NestJS to take control of error handling, log details, and return structured JSON responses at the handler, controller, or global level.
Explore NestJS pipes, including built-in validation and transformation pipes, to convert inputs (like strings to numbers), apply default values, and handle pagination with page and limit parameters.
Discover MongoDB as a cross-platform, document-oriented NoSQL database, with collections of flexible documents and fast queries through sharding, while noting lack of transactions and joins.
Install MongoDB community server on your local machine, unzip the download, set the data directory, start mongod on port 27017, and connect with the mongo shell to view databases.
Create a new nest project with class-validator, class-transformer, and mongoose, install dependencies, run the dev server on port 3000, and scaffold context module, controller, and service.
Connect a NestJS app to a cloud MongoDB Atlas cluster, set up IP whitelisting and a user, and test get and post /contacts against the phonebook Contacts collection.
Deploy your app on Heroku, a platform as a service with managed containers and data services. Sign up for a free account to use the Heroku CLI.
Explore MongoDB's document model where collections hold dynamic BSON documents with varying field structures, and learn how single-document storage avoids joins, subqueries, and lacks transactions.
This lecture compares save() and insert() in MongoDB, showing insert creates a new document and may fail on duplicate _id, while save updates an existing document.
Use the $where operator to filter documents in the sales collection with a JavaScript condition evaluated on the current document, including equals and range checks.
Nest (NestJS) is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with and fully supports TypeScript (yet still enables developers to code in 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 robust HTTP Server frameworks like Express (the default) and optionally can be configured to use Fastify as well!
Nest provides a level of abstraction above these common Node.js frameworks (Express/Fastify), but also exposes their APIs directly to the developer. This allows developers the freedom to use the myriad of third-party modules which are available for the underlying platform.
In recent years, thanks to Node.js, JavaScript has become the “lingua franca” of the web for both front and backend applications. This has given rise to awesome projects like Angular, React and Vue, which improve developer productivity and enable the creation of fast, testable, and extensible frontend applications. However, while plenty of superb libraries, helpers, and tools exist for Node (and server-side JavaScript), none of them effectively solve the main problem of - Architecture.
Nest provides an out-of-the-box application architecture which allows developers and teams to create highly testable, scalable, loosely coupled, and easily maintainable applications. The architecture is heavily inspired by Angular.
In this course I am going to guide you through the process of planning, developing and deploying a fully-featured RESTful web service using TypeScript+NestJS on Node platform.