Connecting with mongodb directly

I connected to the mongodb instance of my server. I created a user table successfully but it doesn’t show up in the Moralis admin console. Is the connected mongodb instance different from the Moralis database?

you have to add the table in the dashboard interface in order to see the data, you will not see the data initially from a table that is created with connecting directly to mongo db

also, based on how you inserted the data, you may have to use string for IDs and not other type of data

I created a ‘user’ table through moralis interface. I tried running a save query from my mongoose client. It inserted the document successfully but I can’t view it there on the moralis dashboard.

now you also have to add the columns in that dashboard in order to see them

assuming that you write in the same table

on the left is the moralis dashboard. on the right is the document saved. What’s the issue now? still can’t see the added row.

I connect to mongoose through
await mongoose.connect(<MONGO_DB_IP>)
Isn’t that enough?

What is the server url?
If you add a row from dashboard you see it in mongodb?

What you do it should be possible to do.

Maybe you are writing in a different db and not in parse?

Hi. Thanks for these tips. worked very well. How can I establish a direct connection to mongo in a cloud function?

you can not do that now in a cloud function, mainly because you don’t have access to a library for mongo db

Hello, I have the same problem as you.

May I know how you resolve it?

I am not able to see the my mongodb and the moralis server has the same documents/collections.

There are actually many databases/collections. We need to choose “parse” to work with and not “admin”

const db = client.db(‘parse’);

hope this can help more people