Report this

What is the reason for this report?

Route already used by (other) component

Posted on February 13, 2023

Hi,

I’ve created an App and wish to have two resources in it, the frontend sitting under mydomain/ and the backend sitting under mydomain/api/.

I’ve created the backend resource first (it’s an express.js app, works, also has its own router) and it is now stuck with serving the /, I can’t find how to change it. I can add more HTTP Request Routes but not remove the root one. When I try to have the frontend serve /, I get the error “Route already in use by the [backend] component”.

How do I make it so that the backend serves mydomain/api/ and the frontend all the other routes including root?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.