search

Home  >  Q&A  >  body text

javascript - nodejs使用mongoose连接数据库,使用post提交表单在后台,后台处理后调用res.redirect()跳转界面无效?

ringa_leeringa_lee2872 days ago359

reply all(2)I'll reply

  • 阿神

    阿神2017-04-17 16:38:36

    Where do the req and res in the error code come from

    reply
    0
  • 迷茫

    迷茫2017-04-17 16:38:36

    The problem has been found because using mongoose.createConnection to connect to the database can only operate the database in the current js. Here I just looked up the data in the users table. In the routing, I also involved data query operations in other tables. There is nothing written there. mongoose.createConnection connection operation library operation.

    reply
    0
  • Cancelreply