Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

89
Visualizações
React+Node have to use 2 seperate codebases/servers?

This is the most basic question.

In every online example I see, to get a website running with NodeJS and React two seperate programs/servers are created. One runs on port 3000 and the other on 3001. Is this necessary? If react is a frontend engine why does it have to run on a port or a server?

Im confused as to why they always use create-react-app which may be running on its own server im not sure.

I would like to create app.js import 'express' to handle requests and also import React on the same file, but I run into compilation errors, will this approach work?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Is this necessary?

No, this isn't ever necessary and is only typically done in development.

If react is a frontend engine why does it have to run on a port or a server?

Webpack (the thing typically bundling your React code for browser usage, similar tools are vite/snowpack) creates a server for live updates and errors so changes in your React automatically propagate to the UI.

This is only done during development and not in production. It's a convenience feature while developing the code.

I would like to create app.js import 'express' to handle requests and also import React on the same file, but I run into compilation errors, will this approach work?

Frontend code usually has a build step where you run npm run build which runs webpack --production over your code (or esbuild or other similar tools). After this point all your frontend code is typically static files (.js .html .css etc) from which point you just serve them from static file storage (usually a CDN for faster load times in different geographies).

over 4 years ago · Santiago Trujillo Relatório

0

Working with React and Express would work, in fact, it's a very popular tech stack.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda