Question

APP Platform: App reloading leads to 404 site

steps to reproduce:

visiting my site under: https://achilles-7z9p9.ondigitalocean.app click on any site in the navigation do a reload

Expectation getting the page for the route Receive: 404 page

i just find answers for droplet Apps :(


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.

Want to learn more? Join the DigitalOcean Community!

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.

@balzerrei @dikshith This worked for me, steps to solve:

ex:
name: myapp
region: fra
static_sites:
  - build_command: |-
      npm install
      npm install -g @angular/cli@11.2.0
      ng build --prod
    environment_slug: node-js
    gitlab:
      branch: master
      deploy_on_push: true
      repo: myrepo/myapp
    name: myapp
    output_dir: dist
    catchall_document: index.html
    routes:
      - path: /
  • find app id by running: doctl apps list
  • update spec by runing: doctl apps update {{ap_id}} --spec app.yaml
  • Item

This worked for me for my app with React Vite. + react-router-dom v6. Thanks!

@Ghenadie works like a charm! 😁