Question

Nuxt 3 baseUrl + DO App Platform Paths/Routes issues

Hello!

I’m trying to deploy my Nuxt 3 apps to DO App Platform. The goal is to have multiple app listen to different paths/routes on the same domain.

For now I’m playing with just one app to keep it simple. I’ve set the baseUrl in the nuxt.config.js to /path/ while also setting

  routes:
    - path: /path/

in my .do/app.yaml. The issue I’m seeing is that calling /path now throws a nuxt 404 and in order to get back a 200 I need to go to /path/path which is not what I’m looking for at all. (Even then the

I’d appreciate any insight here, thank you!

Show comments

Submit an answer


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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
March 16, 2023

Hi there,

Just a quick summary in case that anyone comes across this in the future, we’ve been discussing it here:

https://www.digitalocean.com/community/questions/nginx-internal-communication-between-do-apps

So far, one of the suggestions has been to define your baseURL as an environment variable, eg:

  baseURL: process.env.baseUrl

That way, you will not have to hardcode the /admin value and when deploying to the App Platform, you can set the baseURL to / and the path will not be duplicated once you add the route path in your App Platform configuration.

However this seems to be an issue with the static files which might be fixable using assetPrefix.

For further information in case that anyone comes across this, follow the discussion here:

https://www.digitalocean.com/community/questions/nginx-internal-communication-between-do-apps

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.