What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-11 19:57:02
express.bodyparser express 4
//make sure it is in this order npm i body-parser const express = require('express') const bodyParser = require('body-parser') const app = express() // parse application/x-www-form-urlencoded app.use(bodyParser.urlencoded({ extended: false })) // pars... Add solution -
Other 2021-09-04 12:01:02
bodyparser is deprecated
The package bodyParser is deprecated. You will get this warning with these lines of code: app.use(bodyparser.json()); app.use(bodyParser.urlencoded({extended: true})); If you are using Express 4.16+ you can now replace those lines with: app.use(expres... Add solution -
Javascript 2021-08-28 00:08:01
node.js express post query string
const express = require('express'); const bodyParser = require('body-parser'); const app = express(); app.use(bodyParser.urlencoded({ extended: true })); app.post('/post-test', (req, res) => { console.log('Got body:', req.body); res.sendStatu... Add solution