Node.js running Times error

wrote a simple program that reported an error at run time, and Baidu checked that it was caused by the separation of express and body-parser, so I installed body-parser. But then the same error is reported. The code is as follows:

Mar.18,2021

there are two problems:
1, the sixth line of code, express.bodyParser, bodyParser have been separated, you still express. Naturally, it can't be quoted.
2, if your intention is to upload files, then sorry, bodyParser is also useless, you need to use busboy, multiparty, formidable, multer one of any kind of file processing middleware.

Menu