Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the proper way to terminate the Vue CLI 3 development server?

I have just started to use Vue CLI 3 for a project and it looks like I am not terminating a development session correctly. Like the docs suggests I start a development session with:

npm run serve

Which gives me the port to work on:

App running at:
- Local: http://localhost:8087/
- Network: http://192.168.0.100:8087/

When I'm done working on my project I hit Ctrl-Z and I have my command line back. Yay!

But this leaves something still listening on the port:

lsof -i TCP:8087
COMMAND   PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
node    58122 jannie   14u  IPv4 0xc7ce0b7d644a357d      0t0  TCP *:8087 (LISTEN)

How can I terminate the development server gracefully so that it frees the port when I am done?

like image 442
Jannie Theunissen Avatar asked Sep 21 '18 09:09

Jannie Theunissen


1 Answers

Try using Ctrl-C instead. It allows the application to gracefully shut down.

like image 115
ikkentim Avatar answered Sep 22 '22 10:09

ikkentim