2020 May 20 10:06 AM
Hey Guys!
So for a while I have been using the webide to work on my application, but I said that it's time to make a change and I want to use another editor( VS Code ). I am using odata services and xsuaa, objectstore and connectivity instances.
I can't say I know that much since I am pretty new to all of this, but I'll tel you what I did and what I think it is not working
I have 3 modules, srv (which is using the cds and the odata services) / node / ui (ui5)
Each modules has its own application instance on cloud foundry each application instance is bound to the specific service instances (xsuaa, objectstore etc.)
I installed all the required packages from sap npm registry including the xsenv and xssec and right now the applications are running, but it is more like only the code is running. It is not bound to the same applications from the cloud foundry and I don't have access to the odata services and others.
In other word, the applications instances are bound to the service instances, but the code on my IDE is not bound to those application instances (or that's how it looks like). After I run the applications it seems like the problem is that I don't have access to ODATA services.
I have my mta (even though I didn't run any command related to it or so) and my env VCAP_SERVICES so the modules could connect with xsenv.getServices()
Any ideas what I might be missing?
2020 May 20 11:32 AM
Hi,
do you have default-env.json file in your CAP project root folder?
Also, for ui5, are you using destinations?
Are you using app router? It can be installed locally, configured with default-env.json file for local usage, then you can add destinations to it. Destinations can point to remote service, if required
Please check this blog, it might be helpful
Cheers,
Carlos
2020 May 22 9:51 AM
Maybe the sample here is helpful (although without mta):
https://blogs.sap.com/2020/05/22/ui5-solving-cors-issue-during-local-development-with-app-router/