score:1

Accepted answer

if you're using webpack to create the bundle you need to move the index.html and the bundle.js to your client's server and configure a http server like nginx or apache to point to the index.html file.

score:1

that question is very broad. in case you have a server, you need to login there using ssh and install apache or another server like nginx. i guess your reacft app does not depend on php, or node, so it is static html with js. so basically:

sudo apt-get install apache2

will install the server and to check if it is running just use a browser and navigate to http://<your server ip> and you should see a page saying: »it's working«

if so:

cd /var/www/html
rm -rf *
exit

cd /your/local/project
scp -r * user@<your server ip>:/var/www/html

that should upload all your file to /var/www/html. if you then get a forbidden response, you need to sudo chown -r www-data:www-data * in /var/www/html

have a look here https://help.ubuntu.com/lts/serverguide/httpd.html

but, however, setting up a server becomes more complex, depending on your needs: like node/php/mysql support and of course the os, the instructions above are suitable for ubuntu. additionally no considerations about security are included, so be careful if do not know what you are doing!


Related Query

More Query from same tag