LetHostTalk
Deploying a React Application with Nginx on Ubuntu — LetsHostTalk - Web Hosting Forum
HostNamaste.com

Deploying a React Application with Nginx on Ubuntu

MivocloudMivocloud Member, Provider
You can quickly deploy React applications to a server using the default Create React App build tool. The build script compiles the application into a single directory containing all of the JavaScript code, images, styles, and HTML files. With the assets in a single location, you can deploy to a web server with minimal configuration.

In this tutorial, you’ll deploy a React application on your local machine to an Ubuntu 20.04 server running Nginx.



Commands used
npx create-react-app mivo-deploy
cd mivo-deploy
npm start
npm run build
cat /etc/nginx/sites-enabled/your_domain
scp -r ./build/* username@server_ip:/var/www/your_domain/html
█ Anatolie C. - Sales Officer
█ MivoCloud owns its Data Centers in Moldova and Romania.
█ Enterprise Class Cloud Hosting Services. Reseller KVM SSD VPS.
█ USA (Oregon), Moldova, Romania, Russia (Moscow)
Sign In or Register to comment.
                                                               KVM VPS