من یه مشکل عجیب در دریافت مقادیر ورودی دارم ، و همه راه هایی که در اینترنت بود رو امتحان کردم و متاسفانه هیچ کدوم جواب ندادن
var express = require('express');
var bodyParser = require("body-parser") ;
var ejs = require("ejs") ;
var path = require('path');
var app = express();
app.set('view engine', 'ejs');
app.use(bodyParser.json({ type: 'application/*+json' }));
app.use(bodyParser.text({ type: 'text/html' }));
app.use(bodyParser.urlencoded({ extended: false }));
var jsonParser = bodyParser.json({ type: 'application/*+json' });
var urlencodedParser = bodyParser.urlencoded({ extended: false });
app.use(express.static(path.join(__dirname, 'public')));
app.set('views', path.join(__dirname, 'views'));
app.use('/public/images',express.static(path.join(__dirname, '/public/images')));
app.use('/public/javascripts',express.static(path.join(__dirname, '/public/javascripts')));
app.use('/public/stylesheets',express.static( __dirname+'/public/stylesheets'));
app.get("/" ,jsonParser, function(req , resp , next){
console.log(req.body);
resp.render(__dirname+"/views/index");
});
app.all('/login', jsonParser , function(req, res, next) { console.log(req.body);
console.log(req.body.password);
});
app.listen(3000);
این نمونه کد های بنده است و در تمامی حالات مقدار پارامتر های ورودی خالی هستن لطفا کمک کنید