CosmosDB with ionic 7

Recommende way to connect cosmodb with ionic 7

Assuming you mean Cosmos DB. You would probably want to create a backend API that your Ionic app can make requests to.

The Microsoft Docs have QuickStarts and Tutorials - Azure Cosmos DB for NoSQL | Microsoft Learn.

yes, is cosmosDB sorry, my mistake, the problem is that the client does not have an api, they only use odoo for the write data, and they can use cosmos for read the data, my big problema is related to the configuration of cosmos db into the inonic app

This might be helpful - Azure Cosmos DB client library for JavaScript | Microsoft Learn

There is obviously a big security risk connecting to the DB directly from the client app. At least you are only reading data. I think you would still need an endpoint for the user to auth against which in return gives you credentials to the DB as you wouldn’t want to hardcode those into the app.

In the end, I wouldn’t recommend this approach. You should use a backend API that talks to the DB and the app talks to the API.

Thanks a lot, I agree with the kind of thinking that you wrote. Yes, in the initial scenario, Cosmos DB is only used for reading information, while the writing is done by Odoo.