method: 'POST',
                  
                  
                                    }).then(function(res) {
                  
                  
                                      console.log(res.json())
                  
                  
                                  })
                  
                  
                  а сюда: 
                  
                  
                  
                  
                  
                  router.post('/sendcode', (req, res) => {
                  
                  
                      const {name} = req.body;
                  
                  
                      res.status(200).json(name);
                  
                  
                  });
                  
                  
                  
                  
                  
                  в req.body залитает пустой объект, почему?
                  
                  
                
const bodyParser = require('body-parser'); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false }));
Обсуждают сегодня