Answers for "nodejs bodyparser form data"

0

nodejs bodyparser form data

var bodyParser = require('body-parser');
var multer = require('multer');
var forms = multer();

// apply them

app.use(bodyParser.json());
app.use(forms.array()); 
app.use(bodyParser.urlencoded({ extended: true }));

// how to use

router.post('/', function(req, res) {
    console.log(req.body);
    console.log('received the widget request');
});
Posted by: Guest on January-12-2021
0

how to get data send from a form express

const express = require('express')
const app = express()

app.use(express.urlencoded())
Posted by: Guest on May-05-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language