tayasugar.blogg.se

Livereload change to local host
Livereload change to local host




livereload change to local host

Not sure why your page is not reloading Debug your rules by navigating to edge://extensions, find the Live Reload extension in the list, click 'background page', visit the 'Console' tab and monitor 'All levels'. So in essence, LiveReload does have a way of forcing the client to refresh. Reloads the entire page or just the source file that was changed. I can only assume that whenever the client gets a message about any Pug file being updated, it refreshes. So there's really no way for the client to draw a link between the Pug file that was updated, and the current page that's being viewed. That said, an Express server using Pug is not serving static assets. This seems like a shortcoming in the protocol to me, but I guess it can't be fixed here. From my understanding, the problem appears to be that LiveReload can't directly tell the client to refresh, it can only tell the client which file was updated. However, I really do want restarting the server to cause a refresh in the browser.

LIVERELOAD CHANGE TO LOCAL HOST UPDATE

Thanks, the suggestion about using LiveReload to update Pug files without restarting the server is really cool. I'm not saying that livereload should reload on initial connection, but rather when I explicitly request it. I found #79 (comment), but it seems like what you said there would not be a problem for the setup I'm proposing. It also won't work well because my server startup time might change due to network conditions. Using a hardcoded delay seems like a hacky workaround. Unfortunately, there appears to be no way to do this.

livereload change to local host

To get a refresh when server-side files are changed, it's a simple matter of telling livereload to trigger a refresh of the browser, after my server has started. In my opinion, the right solution to this is for nodemon to start my server which starts a livereload server that only watches the client-side files. When I change server-side files, nodemon restarts my server, and only after the server has restarted can the browser be refreshed. When I change client-side files, LiveReload can refresh my browser immediately. I have client-side files and server-side files.






Livereload change to local host