Skip to content
Sign upLog in
← Back to Community

How to exit shell mode from node.js?

Profile icon
code2039

I coded a simple nodejs.+express app with a few lines.

After I run this app, I pressed Ctrl+C to exit from the app.

But, “Ctrl+C” did not work.

How can I solve this??

Thanks for your help in advance.

Voters
Profile icon
code2039
Comments
hotnewtop
Profile icon
RYANTADIPARTHI

Solution

here are some stuff.

ctrl + c

that's one way

another way is

.exit

like that.
Any of them should work

Profile icon
InvisibleOne

Can't you just click on console
Screen Shot 2021-02-11 at 9.40.58 PM


Or you can leave the repl and reopen it and it should be out of shell mode

Profile icon
code2039

To leave and reopen solves the issue above, but after that, when I change my coding a little and run the app, same issue happens again. I am new to nodejs, would like to know how I can exit from inuse port.(above:3001) so I can re-run after changing some code.

@InvisibleOne

Profile icon
19wintersp

Either Ctrl+C or Ctrl+D should work.