Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

134
Vistas
How to separate the frontend routing from backend endpoints?

I have an express server which handle some routes

/users/login
/users/register 
/orders/add

and so on..

serving a static files, in the default route "/"

so, if user navigated to domain.com for example

it will navigate to that static files

these static files are a react frontend app

the default url "/" will navigate to a login page

and "/dashboard" will navigate to another page

what actually happen, is there's kind of conflict between the backend and frontend routes

for example

if user navigated to "/dashboard"

the expected result is to navigate him to the frontend page

what actual happen is "the backend handle that route not the frontend" and simply return : "I don't have that route (404)

What was in my mind is to navigate any not handled route to the frontend

using that code

  app.get('*', async function (request, reply) {
    return reply.sendFile('index.html')
  })

however, not solved my problem

almost 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda