Question

404 error after deploying angular app with multiple routes

I’m testing the new feature called “apps platform” I’m using an angular project with multiple routes and parameters. I’ve been trying multiple ways to configure my app but always getting a 404 message… any ideas? it would be a best idea to create an empty droplet to manage to route manually?

Subscribe
Share

Submit an 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.

Hi @IsaacFH,

There is a similar question from a user which was also using App Platform with Angular again experiencing a 404 error:

https://www.digitalocean.com/community/questions/app-platform-app-reloading-leads-to-404-site

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

Having said that, I’ll urge you to check out the question and the thread beneath it, it might help you further.