简体   繁体   中英

how to install node-mongodb-native with nodejs in windows

I use nodejs and mongoose to save document to mongodb in windows in development, but I fail to connect to mongodb . My nodeunit test is always being blocked to the line mongoose.connect() .

I found mongoose use node-mongodb-native . My question is:

  1. Do I need to do some special instructions to install node-mongodb-native in windows 7 (64-bit)?
  2. How to install node-mongodb-native in windows?
  1. Mongoose has a dependency on the npm package monogodb .
  2. If you look at the npm page for mongodb here, https://npmjs.org/package/mongodb , you'll find the homepage form the package is http://mongodb.github.com/node-mongodb-native/
  3. That page is node-mongodb-native.

So, there's nothing you need to do special to get it, as doing

npm install mongoose

is enough to install the native package.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM