skip to Main Content

I am a complete newb to Visual Studio Code and React Apps, so please forgive my complete lack of knowledge when it comes to coding.

I have just created a React App in Visual Studio Code and I do not have a clue about how I Export/Publish it to a website. I followed a YouTube video to create the app and after I type ‘npm run dev’ in the terminal, I get a localhost address so that I can view the app and use it in my browser.

Please can you tell me how I can use the localhost address (or convert/deploy it) in a Squarespace or a WordPress website, so that I can make the app usable for the public?

Thank you.

3

Answers


  1. Put simply, you need to find a place to buy/rent a server, which may cost money, or you can find it for free for a trial run on some website. Firebase is an example here. You then host your website on the server.

    If you want to host it locally, and let people from around the internet access the website, you need to ask your ISP to get you a static IP address.

    Login or Signup to reply.
  2. According to this article, here are the way to deploy a create-react-app to Github Pages:

    1. Create a git repository, link your project to it then push it.
    2. install github dependency: npm install --save gh-pages
    3. Edit your packages.json
    {
      "homepage": "https://<my-github-username>.github.io/my-app"
      "scripts": {
        "predeploy": "npm run build",
        "deploy": "gh-pages -d build",
      }
    }
    
    1. Deploy your site by running: npm run deploy
    Login or Signup to reply.
  3. To publish an App developed in React, you can use a free CloudComputing service. At the moment, I recommend use Render platform, its free and you don´t need a credit card to sign in.

    In addition, I list some documentation that will help you to deploy your app:

    I hope I have helped.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search