

Show HN: My nodejs-supervisor like tool, written in Go - DallaRosa
https://github.com/dallarosa/eyenotify

======
fshen
I did one using golang too. [https://github.com/shenfeng/http-
watcher](https://github.com/shenfeng/http-watcher)

It monitors a directory for change (using notify facility provided by the OS),
upon change, will execute a given command given by command line arg
`-command`. If any browser connected, it will try to refresh the browser too.

------
manacit

            flag.StringVar(&path, "watch", ".", "path to be watched")
            flag.StringVar(&command, "command", "echo", "path to be watched")
    

I think there may be a mistake?

~~~
DallaRosa
Fixed :)

[https://github.com/dallarosa/eyenotify/commit/e007b03bdbfd2f...](https://github.com/dallarosa/eyenotify/commit/e007b03bdbfd2fe607523bf95bce30d66e55b0e8)

~~~
uniclaude
You might want to update Readme.md too :)

    
    
      Usage of eyenotify:
       -command="echo": path to be watched

~~~
DallaRosa
thanks man! fixed :)

------
C1D
I'm actually developing a node.js application right now and I wondering if
there was a easy way to live update my changes instead of restarting my app
manually.

This is going to be a great help towards that; props to the author.

~~~
ewolfe
You might be interested in nodemon
[https://github.com/remy/nodemon](https://github.com/remy/nodemon)

~~~
DallaRosa
I've seen nodemon before and this is what worried me the most:

"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)."

Especially on Mac OSX why would you prefer to use an external command like
find instead of using Kqueue? I wonder if find is the right tool for that. And
I wonder again why only on BSD-based systems when linux also has find.

Gotta read a bit more about that.

fyi, this is how nodemon is doing file checking:

find -L /dev/null -type f -mtime -1s -print

([https://github.com/remy/nodemon/blob/master/nodemon.js#L57](https://github.com/remy/nodemon/blob/master/nodemon.js#L57))

------
svenkatesh
Very cool dude.

I hope more OC gets posted to YC, instead of the boring old news articles.

~~~
buster
OC?

~~~
lbotos
Original Content

~~~
buster
It'd be nice to have less of those acronyms on HN, it's really not obvious.
Maybe because i'm not a native speaker..

~~~
DallaRosa
It's not really about being a native speaker. It's really just about getting
used the "lingo".

~~~
buster
And soon everything will be acronyms. What use is it to shorten simple english
words?! We already have enough acronyms in IT, we don't need to shorten simple
sentences as well.. Isn't OP, TFA, AFAIK, IMHO, etc. enough already?

