Dev Server
A simple, cross-platform development server script that watches for file changes and automatically re-runs commands.
- Watches a specified directory for file changes
- Automatically re-runs your command when files change
- Cross-platform support (macOS and Linux)
- macOS:
fswatch
brew install fswatch- Linux:
inotify-tools
apt-get install inotify-tools./dev_server.sh <directory-to-watch> <command-to-run># Watch the current directory and run tests when files change
./dev_server.sh . "npm test"
# Watch the src directory and rebuild your project
./dev_server.sh ./src "make build"
# Watch multiple directories using bash expansion
./dev_server.sh "{src,tests}" "cargo test"MIT