Watch mode
esdev --watch --deny-all --allow-listen=8080 server.ts
The standalone watcher reruns an entry whenever its source changes. The program runs in a child process, so listening sockets, globals and other state do not leak into the next run.
Restart behavior
A restart drains. It is a SIGTERM, the same graceful stop production gets: the server stops accepting, answers requests already in flight, and only then exits. --shutdown-grace=<ms> bounds the wait, after which the process is killed. A program that exits leaves the watcher running.
There is no SIGTERM and no console-independent way to ask another process to stop cleanly, so a restart there kills rather than drains.
What is watched
The watcher starts at the working directory, which is also where the child program runs. If the working directory cannot be obtained, it falls back to the entry file's directory. It walks that directory recursively and watches source extensions.
The generic watcher excludes esdev's own output: its staging directories and any .esdev directory, which holds converted CommonJS packages and screenshot diffs. It takes no rules from esdev.json or .gitignore, and it does not add build assets or explicit permission paths. Those project-aware rules belong to esdev start, which watches its configured build inputs and allowed read paths as well.
Each run starts a fresh esdev <file> process and reads the current project settings: jsx, resolve.alias, plugins and tsconfig.json paths. Editing esdev.json or tsconfig.json reruns the program with those settings.
When to use esdev start
Use the project dev loop when esdev.json describes multiple targets, a server to restart, a directory to serve, or explicit permission paths that should be part of the watch set.