search

Home  >  Q&A  >  body text

node.js - mongodb的正确连接方式应该是什么?

黄舟黄舟2876 days ago398

reply all(5)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-17 16:23:02

    Use moogoose, you don’t need to worry about the connection

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 16:23:02

    I agree with the method on the first floor, just connect it once in the mongoose model

    reply
    0
  • 阿神

    阿神2017-04-17 16:23:02

    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.

    reply
    0
  • 黄舟

    黄舟2017-04-17 16:23:02

    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?

    reply
    0
  • 迷茫

    迷茫2017-04-17 16:23:02

    http://i.jakeyu.top/2017/02/2...

    mongoose manual

    reply
    0
  • Cancelreply