Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

214
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!