-
import bodyParser from "body-parser";Node.js/express.js 2021. 4. 27. 16:38728x90
express.js 버전 4.16.1
npm install body-parser 이후 const bodyParser = require('body-parser'); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); bodypaser에 줄이 그어져있으면서 'bodyParser' is deprecated.ts(6385)
왜 body-parser가 안되누...
medium.com/@mmajdanski/express-body-parser-and-why-may-not-need-it-335803cd048c
4.16.1이상부터는 걍 bardyparser 읎써도 된다고 하네...?
You might not need to install the additional body-parser package to your application if you are using Express 4.16+. There are many tutorials that include the installation of body-parser because they are dated prior to the release of Express 4.16.
728x90'Node.js > express.js' 카테고리의 다른 글
express 프로젝트 필요한것들 (0) 2022.08.01 [express.js] - ec6 문법사용과 class 방식 db연동하기 sequize사용. (0) 2021.07.08