What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-21 06:10:02
express server replit
const express = require('express'); const bodyParser = require('body-parser'); const app = express(); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(express.static('public')); app.get('/', (req, res) => { r... Add solution -
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