Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #103 from dylanmcd/patch-3

Add documentation about how nodemon looks for changes.
  • Loading branch information...
commit a452fb5a4da58d1dfcf03d23be44e2761cfcf693 2 parents d0ba364 + 236f23e
@remy remy authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 README.md
View
8 README.md
@@ -115,6 +115,14 @@ To test this, you can kill the server.js process and forever will restart it. If
Note that I *would not* recommend using nodemon in a production environment - but that's because I wouldn't want it restart without my explicit instruction.
+# Help! My changes aren't being detected!
+
+nodemon has three potential methods it uses to look for file changes. First, it polls using the find command to search for files modified within the last second. This method works on systems with a BSD based find (Mac, for example).
+
+Next it tries using node's fs.watch. fs.watch will not always work however, and nodemon will try and detect if this is the case by writing a file to the tmp directory and seeing if fs.watch is triggered when it's removed. If nodemon finds that fs.watch was not triggered, it will then fall back to the third method (called legacy watch), which works by statting each file in your working directory looking for changes to the last modified time. This is the most cpu intensive method, but it may be the only option on some systems.
+
+In certain cases, like when where you are working on a different drive than your tmp directory is on, fs.watch may give you a false positive. You can force nodemon to start using the most compatible legacy method by passing the -L switch, e.g. `nodemon -L /my/odd/file.js`.
+
# License
MIT [http://rem.mit-license.org](http://rem.mit-license.org)
Please sign in to comment.
Something went wrong with that request. Please try again.