简体   繁体   English

如何使用Sublime Text 3从Windows机器中杀死Live Server

[英]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.

相关问题 如何关闭 Windows 上的 node.js 实时服务器? - How do I close a node.js live-server on Windows? 如何在LIVE-SERVER上使用Javascript查找当前的html文件页面名称 - How can I find the current html filepage name using Javascript, on a LIVE-SERVER 如何在运行实时服务器的情况下在 Visual Studio Code 中调试 JavaScript - How to Debug JavaScript in Visual Studio Code with live-server Running 如何在 VSCode chrome live-server 中运行 npm 模块(puppeteer)? - How to run npm module (puppeteer) in a VSCode chrome live-server? 如何使用sublime文本和Live Reload调试AngularJS应用程序 - How to debug an AngularJS app using sublime text and Live Reload 使用 npm 安装 live-server 包时出错。 `npm audit` 无助于解决问题 - Getting error while installing live-server package using npm. `npm audit` is not helping to fix the problem 使用npm live-server时是否清除localStorage? - Does the localStorage get cleared when working with npm live-server? 关闭和打开应用程序的实时服务器会删除我的本地存储 - closing and opening live-server for an app deletes my local storage yarn eg:'live-server' 不被识别为内部或外部命令 - yarn eg:'live-server' is not recognized as an internal or external command 如何从Node.js杀死Windows上正在运行的进程 - How to kill a running process on windows from nodejs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM