1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Deploying a React Application with Nginx on Ubuntu

Discussion in 'JavaScript' started by MivoCloud, Nov 21, 2024 at 12:09 AM.

  1. #1
    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
     
    MivoCloud, Nov 21, 2024 at 12:09 AM IP