Like comment: Like comment: 1 like Comment button Reply Collapse Expand It's clear I made a mistake but I don't know where I made it.īest regards. Instead, at " localhost:3000" I can directly see the chat. Inside this folder "chat" I uploaded the content of my build folder, including my static folder which contains both folder css and js (and their files).Ħ.a I modified the "public_html/.htaccess" file to add the content you shared with us.Ħ.b I modified the path to "index.html" to be pointed out to the "index.html" inside my chat folder: Under my "public_html" folder I created a folder called "chat". It created the build folder inside my React app. I modified the package.json by including the "homepage" line pointint out to " " htaccess file with the same information listed above Paste the contents of the build file into public_html Navigate to the public_html directory in the cPanel pane on the right-hand side.Once connected, navigate to, select, and copy the contents inside the build file (in the left-side pane showing your computer's directories).Your hosting provider should provide that info for you) into the top bar Input the domain ip, cPanel login, cPanel username, and host port (i.e.
Grab your domain's ip address - or ask your hosting provider.I found it to be unnecessary for my purposes, but should you choose, you can: I know a lot of folks like to use FileZilla to deploy and host their custom web apps. That's it! Navigate to your domain address in the browser and you should see your fully functioning web app. htaccess.Įdit the file and insert the following boilerplate information: In the public_html folder, at the same level as the build file contents, add a new file and name it. In order for the routes to work in your React app, you need to add a. Once you've copied all the contents inside the build file, upload them into public_html. If you upload the entire build file itself, the process will not work. Open it up and select all the contents inside the build file. Navigate to the build file in your app's root directory. Add the Build File Contents to public_html The one we're interested in is public_html. There you'll find a dropdown list of directories. Your cPanel manager should look something like this: Typically there is a dropdown menu of some kind that says "Manage" which will direct you to cPanel. Once you've logged in, navigate to the cPanel manager for your domain. Let's head over to your hosting provider (Namecheap, Godaddy, Bluehost etc.). The build folder is essentially a super-compressed version of your program that has everything your browser needs to identify and run your app. You'll notice this creates a new directory in your project called build.
Once this has finished, the next command you'll run is yarn build ( npm install and npm build work, too). In your application's root directory, run yarn install to install the updated dependencies. Open up your package.json file and add a "homepage" attribute like so: Add the Homepage to your package.json File If not, this tutorial can help you out.Ģ. If you buy them together, these providers will typically point the domain to your hosting server automatically. To host a website, you'll need to purchase a registered domain name and a hosting plan from a hosting provider (both provided through numerous sources like Namecheap or Godaddy).
While working on a personal project called Punchstarter, a Kickstarter clone app, I struggled to find any good documentation on how to host a custom app on my own domain with cPanel.