cortesi / devd

A local webserver for developers
MIT License
3.44k stars 145 forks source link

Can't serve a directory and watching a sub-directory #116

Open DamienCassou opened 3 years ago

DamienCassou commented 3 years ago

I have the following directory structure:

$ tree .
.
├── build
│   └── foo.js
└── index.html

$ cat index.html
<html>
  <head>
    <title>foo</title>
  </head>
  <body>
  </body>
  <script>
    console.log(new Date().toTimeString());
  </script>
</html>

I would like devd to (1) serve files from the top-directory (basically index.html) and (2) reload when build/foo.js (or any other file in build/ changes). In particular, I don't want devd to reload if index.html (or any other file outside of build/) is changed.

I have tried several alternatives with no success: