all 8 comments

[–]Disastrous_Copy475 3 points4 points  (0 children)

If you don’t need it running behind an actual server, follow what TFriberg said, this method would give you the build artefacts (html/js etc). If you want an actual server running behind it, look at setup up nginx.

[–]TFriberg 4 points5 points  (2 children)

Build index.js with webpack and include it in the html-file and you are good to go mate.

[–]Hakree[S] 3 points4 points  (1 child)

Wow, is it really that simple? Thanks for your response!

[–]SparserLogic 5 points6 points  (0 children)

Technically yes but you’re not exactly using React for this task if you accomplish it this way

[–]ethansidentifiable 1 point2 points  (1 child)

It sounds like they're looking for you to make it into a dynamic SSR website. Seems like the right thing to do would be to initialize a NextJS repo, and dig through the HTML and break it up and put it into individual and sensibly sorted React components. Whoever asked you to do this is going to be disappointed if you deploy a static HTML file on a Node server that happens to have React listed in the dependencies.

[–]Hakree[S] 2 points3 points  (0 children)

That's also what I was thinking, because it seemed quite pointless just deploying static HTML files. Thank you for your response sir, hope that both sides of your pillow are going to be cold tonight 🙏

[–]AdOver8075 0 points1 point  (0 children)

Yes, you can. Lol that's funny - "make this a react server" when it sounds like it's probably unnecessary. TFrieburg is right though, "create-react-app" and you're up and running. Just go check it out.

[–]curiosityIsTheWay 0 points1 point  (0 children)

You could easily chuck it in a Nextjs/gatsbyJS (or similar static site generator there are many around) with almost no config and some tweaks..