Based on your video on how to deploy react app with laravel as API, tried to do the same with a Nuxt app. Added a env variables, absolutely everything 1:1 as is in video except for variable name for react (REACT_API…), so i got API_BASE_URL=${APP_URL}/app/api
No matter what i set into this variable, my nuxt app is trying to hit example.com/api/landing NO ‘/app/’ part. If i try to access to example.com/app/api/landing this does work.
Why is variable not taken in count?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Hey there!
It looks like you are trying to set routes using env variables. Have you configured any routes in the UI for each component? It does look like this is defaulted to /api. You may also need to configure routes there for your react app if you haven’t done so.
App Platform Routes
Hope it helps! Nate