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

397
Vistas
How to deploy ReactJS web application on a windows server using Node.JS?

I have developed a ReactJS app using the create-react-app on my local windows 10 machine..

Now, I want to deploy this application on a on-premise windows 2008 R2 server. I do not have much experience with this. When I searched over the internet, all the articles are talking about either deploying into IIS or in cloud. But, I do not want to use IIS and I have On-Premise server.

Is there any other way to deploy and host this ReactJS application on Windows server machine? Maybe just using the Node.JS?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Create the build using npm run build and write a nodejs script with express to serve the build directory.

The nodejs script would be like this:

start-server.js

const express = require("express");
const path = require("path");

const basePath = '';
const app = express();

app.use(basePath + "/", express.static(path.resolve(__dirname + "/build")));

app.get("*", (request, response) => {
  response.sendFile(path.resolve(__dirname + "/build/index.html"));
});

app.listen(port);

To start the server:

node start-server.js
over 4 years ago · Santiago Trujillo Denunciar
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