人生最曼妙的风景,竟是内心的淡定与从容!
Use moogoose, you don’t need to worry about the connection
I agree with the method on the first floor, just connect it once in the mongoose model
A very simple system. I don’t want to load too many other third-party libraries. I have found the answer. Just connect to the database at the beginning and then listen.
Excuse me, when there are multiple page requests at the same time, how many times does your program connect to the database? Once? Isn’t that blocked?
http://i.jakeyu.top/2017/02/2...
mongoose manual
Use moogoose, you don’t need to worry about the connection
I agree with the method on the first floor, just connect it once in the mongoose model
A very simple system. I don’t want to load too many other third-party libraries. I have found the answer. Just connect to the database at the beginning and then listen.
Excuse me, when there are multiple page requests at the same time, how many times does your program connect to the database? Once? Isn’t that blocked?
http://i.jakeyu.top/2017/02/2...
mongoose manual