[英]How to kill the live-server from windows machine using sublime text 3
So I am building a react app using npm, the problem is whenever I start the live-server to update the website automatically for any changes I make in the code, the terminal just freezes and it does not let me type anything. 因此,我正在使用npm构建一个React应用程序,问题是每当我启动实时服务器以针对代码中所做的任何更改自动更新网站时,终端就会冻结,并且无法输入任何内容。 I am opening the terminal on windows 10 on the editor sublime text itself. 我将在Windows 10上打开终端上的编辑器崇高文本本身。
If you want to stop running the server (meaning your app will no longer be available on localhost), you should be able to use ctrl + c to stop any running processes in the current terminal tab. 如果要停止运行服务器(意味着您的应用程序将不再在localhost上可用),则应该能够使用ctrl + c停止当前终端选项卡中的所有正在运行的进程。
When you're running a server/process in terminal, you'll need to open a separate tab/window to do anything else. 在终端中运行服务器/进程时,需要打开一个单独的选项卡/窗口以执行其他任何操作。
You should look at the documentation for the terminal package you're using in Sublime to find out how to open a new tab, or just use the built-in terminal which definitely supports multiple tabs/windows. 您应该查看Sublime中使用的终端程序包的文档,以了解如何打开新选项卡,或者仅使用肯定支持多个选项卡/窗口的内置终端。
I'm not sure but are u using live-server package? 我不确定,但是您正在使用实时服务器软件包吗? If you are u can specify wait parameter before starting server something like this 如果您是您,可以在启动服务器之前指定等待参数,如下所示
var liveServer=require("live-server");
var params={
wait= 1000 //thats in ms milliseconds
};
liveServer.start(params);
Taken from official documentation . 取自官方文件 。 If u wana kill it then u have to do it manually like JBallin said 如果您想杀死它,那么您必须像JBallin所说的那样手动进行
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.