MercuryTechnologies / ghciwatch

Load a GHCi session for a Haskell project and reload it when source files change
https://mercurytechnologies.github.io/ghciwatch/
MIT License
111 stars 10 forks source link

[DUX-2458] Documentation for running a server #315

Open 9999years opened 2 months ago

9999years commented 2 months ago
  1. Are there any new configuration options or commands to enable server mode?
  2. Is there documentation available on how to set up ghciwatch for running and auto-reloading a web server or similar application?
  3. Are there any best practices or examples you can share for using this new functionality?

See: https://github.com/MercuryTechnologies/ghciwatch/issues/143#issuecomment-2287999960

Related: https://github.com/MercuryTechnologies/ghciwatch/issues/226

From SyncLinear.com | DUX-2458

9999years commented 2 months ago
  1. Not really
  2. You probably want something like --test-ghci DevelMain.update
  3. Running a command that writes to stdout asynchronously (like Yesod does, see https://github.com/ndmitchell/ghcid/issues/298) might cause problems (ghciwatch works by parsing the GHCi stdout), so we really want to redirect logs to a file and have ghciwatch read them from there (see #226).