Quantcast
Channel: Express.js req.body undefined - Stack Overflow
Viewing all articles
Browse latest Browse all 54

Answer by Sonali Mangrinda for Express.js req.body undefined

$
0
0

The middleware is always used as first.

//MIDDLEWAREapp.use(bodyParser.json());app.use(cors());    app.use(cookieParser());

before the routes.

//MY ROUTESapp.use("/api", authRoutes);

Viewing all articles
Browse latest Browse all 54

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>