javascript - mongoose save does not work and has no response~~
淡淡烟草味
淡淡烟草味 2017-07-04 13:44:14
0
1
1369
const register = async (ctx, next) => {
  console.log(123)
  const opts = ctx.request.body
  const newUser = await user.save(opts)
  console.log(newUser)
}

123 can be printed, and new User can also print, and then it stops when it comes to the save method. There is no response? ?

How is this going? ?

Looked at issues https://github.com/Automattic... Still not solved? ? what to do? ?

淡淡烟草味
淡淡烟草味

reply all(1)
女神的闺蜜爱上我

Axiba is the reason for the mongodb connection, just put the code directly at the top

const mongoose = require('mongoose')
mongoose.Promise = require('bluebird')
mongoose.connect('mongodb://localhost/blog')
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template