node.jsgithub-pagesnetlifycloudflare-pages

How to hot reload on netlify?


Netlify just as example, same question with CloudFlare Pages etc.

In the past I setup my own server with node and react/vue.

I have my node setup on a server because I don't want to install node and node packages on my local machine.

When I was developing I SSH into the server with port forwarding. So I ran a dev server on port 8888 (npm run dev) on the server and opened http://localhost:8888 in my local browser.

When I make a change to the files I can immediately see the effects without running npm run build.

I am thinking about using a service like netlify because its the right thing to do? But how can I see the changes I make without actually running build?

Is this even possible or do you use theses service only when you are building a website that rarely changes? I am probably missing something. But not sure how to proceed.

I don't know what's the right way. I am very open to suggestions.

Edit: These services that I mentioned are meant for build only. See answer below. I am still leaving this question so people can post suggestions.


Solution

  • You cannot do this. Those services are only for hosting the build version of your app. You have to develop it locally and push the build to these services.

    Why would you even want to run a development version online?