Pagination @Put(), @Delete()
Status code problem Nest will give a default status code of 200 when the request is successful. But we can also customize the status code and return. Nest does not need to memorize all status codes,
Derek Zhu
Status code problem Nest will give a default status code of 200 when the request is successful. But we can also customize the status code and return. Nest does not need to memorize all status codes,
Generate a controller by running the Nest CLI Command: nest generate controller, which can be abbreviated as nest g co. Then enter the name of the controller. (If you don’t want to generate test fil
Difference between NestJS and NodeJS NestJS is a framework that lets programmers focus on the application problem at hand rather than the tiny implementation details like setting up TypeScript, API
Create a project First create the src folder in the project folder, then create the entry file index.js in it, then run npm init -y . Then install express, dotenv, cors, morgan, Mongoose packages. n
Create interface steps (summarize previous lessons) Create the basic server: app.js 123456const express = require('express')const app = express()//main codeapp.listen(80, function(){
Classification of middleware Express officially divides common middleware usage into five categories: Application-level middleware Route-level middleware Error-level middleware Express built-in
The concept of middleware Middleware refers specifically to the intermediate processing links of business processes. The calling process of Express middleware is that when a request arrives at the E
express.static() express.static() can be very convenient to create a static resource server. It can specify a directory to be hosted as a static resource folder, and can access all files under the d