如何在Netlify上加热重新加载?

发布于 2025-01-21 06:32:44 字数 531 浏览 4 评论 0原文

例如,netlify作为例如,与CloudFlare页面等相同的问题等。

过去,我用节点和React/Vue设置了自己的服务器。

我在服务器上设置了节点设置,因为我不想在本地计算机上安装节点和节点软件包。

当我开发时,我会使用端口转发到服务器中。 因此,我在服务器上运行了端口8888(npm Run Dev)上的DEV服务器,并在我的本地浏览器中打开http:// localhost:8888

当我更改文件时,我可以立即看到效果,而无需运行npm run构建

我正在考虑使用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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忱杏 2025-01-28 06:32:44

你不能这样做。这些服务仅用于托管您的应用程序的构建版本。您必须在本地开发它,并将构建推向这些服务。

您为什么还要在线运行开发版本?

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文