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

213
Vistas
React & Node JS deployment on Apache server

I am trying to deploy my react app with node js as a backend on apache server on a shared hosting. My folder structure is lke following:

  1. client //frontend folder along with build folder inside it "created by npm run build"
  2. config
  3. controllers
  4. models
  5. node_modules
  6. routes
  7. package.json
  8. package.lock.json
  9. server.js

I have checked numerous tutorials and articles on the internet but failed to deploy it. Do I need to create ".htaccess" file? Can anyone guide me how to deploy it properly.

My server.js code:

// ROUTES
app.use("/api/sms", sms);

app.get("*", (req, res) => {
  res.sendFile(path.resolve(__dirname, "/client", "build", "index.html"));
});

//CONFIGURE PORT
const PORT = process.env.port || 5000;
const server = app.listen(PORT, () =>
  console.log(
    `Server running in "${process.env.NODE_ENV}" mode on port "${PORT}"`
  )
);
over 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