live-server icon indicating copy to clipboard operation
live-server copied to clipboard

Reload manually

Open LoganDark opened this issue 5 years ago • 9 comments

I have a script I'm making where it would be very useful to have a simple web server where I can tell the client, manually, to reload.

I'm messing with a bunch of files and I'd only like to reload the client once the build is complete. I don't want a bunch of reloads in between.

Is there a way to do this?

LoganDark avatar Aug 17 '18 11:08 LoganDark

The live-server, npm tool, is only use for developing, not use for producation. If you want to reload manually, you can seehttps://github.com/tapio/live-server/issues/326. May it will help you.

arm-liang avatar Nov 28 '19 01:11 arm-liang

live-server --ignore=*/**

arm-liang avatar Nov 28 '19 01:11 arm-liang

The live-server, npm tool, is only use for developing, not use for producation

I'm not using it for production. When I build and multiple files change, it reloads multiple times and you end up with a weird combination of new and old files.

LoganDark avatar Nov 28 '19 03:11 LoganDark

Sorry for my poor english comprehesion. -_-|| I had also ever met such a problem in a low probability when a change multiple files before I use VsCode to save multiple files. But now I use webstrom, when I focus the editor the broswer will reload successfully and then I had never meet such a problem.

arm-liang avatar Nov 28 '19 03:11 arm-liang

Yeah, I hate VS Code too.

But there's only one way to build an Angular project, and it builds the files in order, writing them one after another. So the browser reloads multiple times.

LoganDark avatar Nov 28 '19 03:11 LoganDark

Maybe we should suggest the Live-Server have a debounce function when refresh page to prevent multie file change.

arm-liang avatar Nov 28 '19 03:11 arm-liang

Hi! +1 on this issue

I really miss a hook url on the server to allow force refresh manually (p.e. using curl)

Debounce may work, but it would be great to be able to refresh as fast as possible. With the debounce approach, reload may delay as much as the debounce interval

jgermade avatar Dec 13 '19 15:12 jgermade

I've created #333 for accomplish this approach

jgermade avatar Dec 13 '19 23:12 jgermade

Maybe we should suggest the Live-Server have a debounce function when refresh page to prevent multie file change.

lao tie ,zen me yong html function to start and stop live-server?

Yes-Jumby avatar Jul 02 '20 02:07 Yes-Jumby