tapio / live-server

A simple development http server with live reload capability.
http://tapiov.net/live-server/
4.43k stars 484 forks source link

How could I start and stop live-server in js(html) language instead terminal? #350

Open Yes-Jumby opened 4 years ago

Yes-Jumby commented 4 years ago

hi,everyone: Now I could use code to start live-server,but I cannot stop it ,could someone give me a hand?

jhildenbiddle commented 4 years ago

The docs don't mention this. I found the solutions here: https://github.com/tapio/live-server/issues/169#issuecomment-270846429

// Start
liveServer.start({ /* Options */ });

// Stop
liveServer.shutdown();