node.js - mongodb的正确连接方式应该是什么?
黄舟
黄舟 2017-04-17 16:21:02
0
5
370
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(5)
伊谢尔伦

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template