简体   繁体   中英

Can I use the same MongoDB database from Python and NodeJS

I would like to know if it would be possible to use MongoDB in the following way:

I want the database to be populated and modified from a script written in Python and to be queried from Node JS.

Is it possible? If yes, Does this approach have any kind of compatibility problems or inefficiencies?

Thank you in advance

Yup, it's possible unless you mess up with the schema. Cause mongo won't complain for different types of objects in the same collection.

I would suggest using mongoose for Node.js and pymongo for python. You can easily install pymongo by doing - pip install pymongo in linux and osx systems. But for window I think u will have to do it manually from here .

I think reading the documentation for each of them would give you a better idea. You can also take a look at getting started with mongodb . You will find how to use it in many different language.

Thanks!!

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