Hi Guys,
I can’t use Mongodb or Mongojs in Expo.It failed to bundle and have no error message.I know that expo can use sqlite to be local database, but we need to use online database to collect user information.Can anyone suggest some online db for us?
Thank you.
Easiest way would be to use firebase firestore or the RTDB. You could always use mongoDB on your server though and just connect to that
Thanks for your answer, but i still have some question.
I try to use mlab, so i use “npm install mongojs”.and follow the example on the websites.
But when i use " var db = require(“mongojs”);", i recieve that i need to install “ulti”,after i install it, it still bundle error but have no message.So how can i connect to mlab when i use Expo ??
Thank you a lot!!
Util is a node module for Node.js, and therefore you cannot use it with React Native. Similar to how fs or path works.
So if Mongojs uses util, I don’t think you can use that ORM. Maybe Mongoose can help you?
I see, Thank you
If you want to use mongodb, you’d need to run it on your server and then perform all db operations from there. You’d then need to use something like the fetch API to make https requests to your server with the data you want to update. As cronnay has suggested. Mongoose would probably be quite helpful to you
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.