Question

Catch-all routes for App platform

I’m setting up an app that has a static site for a frontend and a backend api. How do I setup the HTTP routes properly?

I have the static site’s HTTP route set to “/” and the backend’s set to “/backend” but when I visit “/some-route” it 404s instead of letting my static site’s router kick in. How do I set it up so that doesn’t happen?


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.

Okay I had my custom page set to catch all and not error, switching to error fixed it.

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.