8
8 Comments

HTML Front Page + React App

I have a customized HTML landing page and a React App. I know how to host my React App, but how can I put them into one?

Ex: I can upload my app on Netlify, but what about the landing page? Confused.

on August 20, 2020
  1. 1

    There are a lot of good reasons to put your app on a subdomain as discussed here: https://twitter.com/tylertringas/status/1250521285630836741. I think that is what most people do.

    That said I've personally decided to combine my app and website on the same domain using Gatsby. Gatsby is a static site generator that uses react and you can use it to create both static pages and a react app. See: https://www.gatsbyjs.com/docs/adding-app-and-website-functionality/

    Basically Gatsby serves as both a static site generator as well as a replacement for CRA. It's not the easiest setup to do – you have to worry about things that work on client-side but not server-side. But so far, I'm liking it a lot.

  2. 1

    Just wrap the html page into a React component?

  3. 0

    I would host them separately especially if you're using CRA.

    https://versoly.com/ is hosted on Versoly (S3 AWS) and https://app.versoly.com is hosted on Netlify

    1. 1

      So if I purchase the domain from Namecheap, can I extend it to both Versoly & Netlify?

        1. 1

          Ok thanks. Cool how your example solved my problem as well lol

    2. 1

      Versoly looks awesome man. Thank you!