N
N
Nwton2016-05-26 17:51:30
Node.js
Nwton, 2016-05-26 17:51:30

How to stop a nodejs script running in the background?

Run a nodejs script in the background by adding & at the end of the command
nodejs ./app/index.js &
How can I now stop the execution of this script without killing nodejs itself?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexey Yarkov, 2016-05-26
@Nwton

Use pm2 for example

D
Dmitry Belyaev, 2016-05-26
@bingo347

ps l | grep nodelook at pid (usually 3rd column)
kill -9 {pid}where {pid} is the pid from the previous
ps command use the pm2 utility to run it in production

A
Alexander Aksentiev, 2016-05-26
@Sanasol

kill
stop script and eat kill nodejs.
How else do you want to stop him?
Well, yes, use pm2/supervisor/etc

W
Wheelie, 2015-08-24
@sedoyky4er

@media (max-width: 480px) {
.sidebar {display:none;}
{

and to show via jquery
$('.show_sidebar').on('click',function(){
$('.sidebar').slideToggle(500);
});

S
sedoyky4er, 2015-08-24
@sedoyky4er

$('.show_sidebar').click(function(){
$('.sidebar').slideToggle(500);
});

This is not exactly what I need. He works. But the point is that I have two menus, one in the header (horizontal), the other is the whole sidebar. In full-screen mode, everything is displayed as it should, but when I narrow the browser window, an icon appears where the header menu and the full sidebar are placed. How can I organize this?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question