Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification when build completes #264

Open
jamesarosen opened this issue May 12, 2023 · 1 comment
Open

Notification when build completes #264

jamesarosen opened this issue May 12, 2023 · 1 comment

Comments

@jamesarosen
Copy link

jamesarosen commented May 12, 2023

When developing a website with Viceroy, my current process is

  1. run fastly compute serve --watch --watch-dir=src
  2. edit a file in src
  3. Viceroy automatically rebuilds the service
  4. watch the logs for approximately 3 seconds until the HTTP server comes back up
  5. switch to my browser and refresh

I'd love to receive a notification (e.g. a UNIX signal, touching a file, executing a command, or running a JS/TS/RS/WASM function) when the compilation is done and the server is back up. That would allow me to implement live-reload or even hot module replacement.

Possibly related: #55

@jamesarosen
Copy link
Author

jamesarosen commented May 12, 2023

Until this, a workaround is to watch the files outside fastly compute serve, then restart fastly compute serve (without --watch), poll the HTTP server until it responds, then send the live-reload and/or HMR notifications to the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant