body-parser:
Parse incoming request bodies in a middleware before your handlers, available under the req.body property.
when you use body-parser, you need to put any options. if you dont, you will get a sentence like "body-parser deprecated undefined extended: provide extended option"
so we usually put ".urlencoded({ extended: true or false })" this means
if "extended : true", this means req.body is the 'application/x-www.form.urlencoded' type.
"x-www.form.urlencoded" type makes datas to "key : value"
'express' 카테고리의 다른 글
What is node.js?[not done] (0) | 2020.07.14 |
---|---|
passport-facebook with JWT [Express] (0) | 2020.07.03 |
How to test passport-facebook /Social login test [TDD] (0) | 2020.06.28 |
How to show joined models [mongoose] (0) | 2020.05.21 |
Permission check on user's actions [Express, Node] (0) | 2020.05.21 |