Search code examples
node.jsreactjsgithub-pages

How does React work with Github pages isn't github pages only for static websites?


There are tutorials on how to make your github.io with React, but isn't github.io only for static websites? Will the server side with Node work? Thanks!


Solution

  • You can use React to build "static" websites. "Static" in this context means that:

    • no data is dynamically retrieved from the server
    • there are no APIs running on the server
    • the server is stateless
    • the files can be served by a "dumb" web server, like nginx

    You cannot run a Node server from Github pages, or any kind of server. You can only build static sites, as you've mentioned.