Import an AP.request response into frontend of my app

Hello everyone,
We are starting the development of an app for jira cloud marketplace, using Atlassin-connect-express and React.
in our app root folder we split the code into two folders, backend and frontend.
In the backend folder we started a new atlas-connect app and in the frontend folder, we started a new react app to use as frontend of the app.
It worked successfully.
Now we need to use AP.request to import some issues information to use in the app.
Unfortunately we are facing trouble when doing so, because for some reason, I can only use the AP.request on the backend folder (where I started the connect app), and it apparently works. However, when I try to import the data retrieved to use in the frontend, React stops me with this message:

And if i try using the AP.request in the frontend/src folder, it retrieves “AP is not defined”.
Can someone, please, help me solving this problem?

1 Like

Can you share more on why you have to have the backend and frontend split up?

The output of a atlassian-connect-express app includes React already.

If you want a totally separate React app that is served from a different service than the backend service, you’ll need to include the Connect Javascript API source in the stand-alone React app:

1 Like