lundi 1 avril 2019

ReactJS: How to host my single-page app in a different directory than root folder?

I've already took a deep search on this topic but I haven't found anything useful with my case.

Issue

What I am trying to achieve is to successfully host my reactjs app on the hosting server I paid for. But when I use npm run build it clearly says that the app must be uploaded in the root directory of my website. Which is what I'm trying to overcome.

My hosting server details are:

  • Apache version => 2.4.38
  • PHP version => 7.0.33
  • MySQL version => 10.0.38-MariaDB-cll-lve
  • Architecture => x86_64
  • OS => linux
  • Shared IP Address => 67.XXX.XXX.XXX
  • Perl access route => /usr/bin/perl
  • Perl version => 5.16.3
  • Kernel version => 3.10.0-714.10.2.lve1.5.19.9.el7.x86_64

I've tried to place it on a different directory and it just doesn't work...

How can this be solved?




Aucun commentaire:

Enregistrer un commentaire