Javascript 如何阻止流星?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12238382/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to stop Meteor?
提问by drzhbe
The only answer on this question I saw - go start another copy on the different port. Switching from one Meteor workspace to anotherOkay, I see that I can run another one on the different port, BUT how to stop the first one?
我看到的关于这个问题的唯一答案 - 在不同的端口上开始另一个副本。 从一个 Meteor 工作空间切换到另一个好的,我看到我可以在不同的端口上运行另一个,但是如何停止第一个?
回答by John Devor
I use this command:
我使用这个命令:
kill -9 `ps ax | grep node | grep meteor | awk '{print }'`
Or, I run this if I'm on my local machine to kill remote processes:
或者,如果我在本地机器上杀死远程进程,我会运行它:
ssh [user]@[server] <<'ENDSSH'
kill -9 `ps ax | grep node | grep meteor | awk '{print }'`
exit
ENDSSH
回答by Gregone
On OSX, go back to the term you opened to start meteor, and use CTRL+Cto quit the process.
在 OSX 上,返回您打开的术语以启动meteor,然后使用CTRL+C退出该过程。
回答by Roman
if Meteor is running on :3000 port:
如果 Meteor 在 :3000 端口上运行:
kill -9 $(lsof -i :3000 -t);
回答by AnoopGoudar
Enter command "Ctrl + C" on the terminal where the meteor process is running. This is the easiest way to kill the process in both Mac and Ubuntu. Not sure of Windows though.
在运行meteor 进程的终端上输入命令“Ctrl + C”。这是在 Mac 和 Ubuntu 中终止进程的最简单方法。虽然不确定Windows。
Happy Coding!
快乐编码!
回答by Lawrence Weru
Similar to Fernando's response, if you're on OSX you can quit the processes node
and mongod
using Activity Monitor.
与 Fernando 的回应类似,如果您使用的是 OSX,您可以退出进程node
并mongod
使用活动监视器。
quitting node
will stop the server. The database will still be running and accepting incoming connections, so quitting mongod
will turn off the database.
退出node
将停止服务器。数据库仍将运行并接受传入连接,因此退出mongod
将关闭数据库。
回答by Fernando á.
In my case (Ubuntu 11.10) I open the System Monitor and kill manually the node
and mongod
processes.
在我的情况下(Ubuntu的11.10)我打开系统监视器和手动终止node
和mongod
过程。
Of course you can use also the terminal and kill these processes knowing their PID's.
当然,您也可以使用终端并在知道它们的 PID 的情况下杀死这些进程。
回答by masavini
An edit to John Devor's (accepted) answer: if you're editing your code with Atom, his command may kill the editor instances:
对 John Devor 的(已接受)答案的编辑:如果您使用 Atom 编辑代码,他的命令可能会杀死编辑器实例:
$ ps ax | grep node | grep meteor
19312 pts/2 Sl+ 0:16 /home/teo/.meteor/packages/meteor-tool/.1.1.4.e4elpj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node /home/teo/.meteor/packages/meteor-tool/.1.1.4.e4elpj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/main.js
19541 pts/2 Sl+ 0:02 /home/teo/.meteor/packages/meteor-tool/.1.1.4.e4elpj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node /home/teo/meteor/beari/dist/.meteor/local/build/main.js
24438 ? Sl 0:00 /usr/share/atom/atom --no-deprecation /home/teo/.atom/packages/linter-jshint/node_modules/jshint/bin/jshint --reporter /home/teo/.atom/packages/linter-jshint/node_modules/jshint-json/json.js --filename /home/teo/meteor/beari/beari.js -
Better to use a command like:
最好使用如下命令:
kill -9 `ps ax | grep node | grep meteor | grep -v atom | awk '{print }'`
回答by TimM
When you are looking at the terminal with the unwanted meteor running just press Ctrl+Cto turn off meteor.
当您看着正在运行的不需要的流星的终端时,只需按Ctrl+C即可关闭流星。
To run more applications side by side run on a different port with the --port
option
要并排运行更多应用程序,请使用该--port
选项在不同端口上运行
回答by Thusila Bandara
the default port is 3000.If you want to run it in a different port use below meteor run --port 3030
默认端口是 3000。如果你想在不同的端口中运行它,请使用下面的meteor run --port 3030
run this in two command prompt.If you want to stop use ctrl+c in necessary command prompt
在两个命令提示符下运行它。如果你想在必要的命令提示符下停止使用 ctrl+c
回答by Ashraf
use sudo killall -9 node
command. it will kill all the rprocess.
使用sudo killall -9 node
命令。它会杀死所有的 rprocess。