What does HackerNews think of devd?

A local webserver for developers

Language: Go

There are plenty of solutions to that specific problem. Nowadays, I only work on Nuxt/Next/Astro projects that come with hot reload out of the box so I don't have a need for it anymore, but I have used https://github.com/cortesi/devd a lot in the past, with much success.

A zero-install solution would be to use the "workspace" feature of Chrome's Dev Tools:

1. Open your index.html file in Chrome.

2. Open the Dev Tools.

3. In the "Sources" tab, activate the "Filesystem" sub-tab.

4. Click on "+ Add folder to workspace" and choose the directory containing your index.html and index.css files.

5. Edit the index.css file with autocompletion and live preview.

6. Save your work so that it is synchronized with your filesystem.

In action: https://i.imgur.com/slcSt9X.gif

If I'm understanding you correctly, then this combination of two tools from the same author will get you that:

https://github.com/cortesi/modd

https://github.com/cortesi/devd

In tandem with https://github.com/cortesi/devd I've found it a good setup for web development.

Modd watches file changes and rebuilds, while Devd enables livereload, letting me make changes in my text editor and then see the rendered changes in the browser, side-by-side, in near real-time.

This is for go web development but I'm pretty sure these two tools are language-agnostic.

I can attest to modd too, it uses a (per project) configuration file to define include/exclude (recursive) globs, along with respective blocks of commands.

I would also like to extol virtues of its sister project devd[0] from same author which makes web development palatable to me. It's a little websocker server that injects a tiny script into HTML to reload the page in browser once modd detects file change, rebuilds front-end and sends devd a SIGHUP.

[0] https://github.com/cortesi/devd

Another good option for static site development is devd [1] [2] which can automatically open the site in browser with livereload:

   devd -ol .
[1]: https://github.com/cortesi/devd

[2]: https://news.ycombinator.com/item?id=10436111

For local development, consider looking into devd (https://github.com/cortesi/devd). It's a single binary that supports things like livereload, network throttling, routing, and reverse proxying.
I'm moving in a similar direction for similar reasons - but by shifting functionality out of the node ecosystem altogether. I recently released devd, a small, dev-focused HTTP server with build-in livereload which has taken the place of gulp livereload and node-based dev servers for many of my projects (https://github.com/cortesi/devd).

I'm now working on the next step. It's not quite ready to be announced yet, but I'm cooking up modd, a similarly focused tool for monitoring the file system and responding to changes (https://github.com/cortesi/modd). Modd has already supplanted gulp entirely for many of my use cases, and has replaced supervisor and a bunch of other tools to boot. Many of the actions triggered by modd for front-end projects are precisely invocations of npm scripts as described in the article. A few more features (desktop notifications with Growl/notify, and script access to the list of changed files), and modd will be ready for me to ask for public feedback.

Both modd and devd are small, single-purpose tools written in Go, released as statically compiled binaries with no external dependencies. I've tried to make them tight and focused, and if I get it right, they will hopefully be a refreshing change after gulp and grunt.

Devd doesn't appear in my gulpfiles at all, actually. Gulp literally just renders to disk. I then start devd separately with the appropriate livereload flags to handle the service end of things.

For instance, here's a devd command-line from the docs (https://github.com/cortesi/devd) that handles proxying local services, with a static directory overlaid. Gulp would be rendering assets into that static directory, the change would be noticed by devd, and liverload would be triggered.

  devd -l \
  -w ./src/ \
  /=http://localhost:8888 \
  /api/=http://localhost:8889 \
  /static/=./assets