skip to Main Content

Mongodb – req.body undefined in postman form-data but able to get in raw json

app.js const express = require('express'); const app = express(); const hostname = '127.0.0.1'; const port = 3000; const path = require('path'); const bodyParser = require('body-parser'); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(express.urlencoded({ extended: false })); app.use(express.json()); app.use('/products', require('./Routes/products.js')); // Set EJS…

VIEW QUESTION
Back To Top
Search