egg-watcher
File watcher plugin for egg
Usage
In worker process:
app.watcher.watch(path, listener)
Start watching file(s).
- path(String|Array): file path(s)
- listener(Function): file change callback
app.watcher.unwatch(path[, listener])
Stop watching file(s).
- path(String|Array): file path(s)
- listener(Function): file change callback
In agent process:
agent.watcher.watch(path, listener)
Start watching file(s).
- path(String|Array): file path(s)
- listener(Function): file change callback
agent.watcher.unwatch(path[, listener])
Stop watching file(s).
- path(String|Array): file path(s)
- listener(Function): file change callback
watch mode
development mode is included.
development Mode
When your app is running at local(env is local
), it will be in development mode
. Once local file is modified it will emit change
event immediately.
Questions & Suggestions
Please open an issue here.
License
MIT