Show HN: My nodejs-supervisor like tool, written in Go
1–10 of 17 posts
Re: Show HN: My nodejs-supervisor like tool, written in Go
#2 flag.StringVar(&path, "watch", ".", "path to be watched")
flag.StringVar(&command, "command", "echo", "path to be watched")
I think there may be a mistake?Re: Show HN: My nodejs-supervisor like tool, written in Go
#3This is going to be a great help towards that; props to the author.
Re: Show HN: My nodejs-supervisor like tool, written in Go
#4I hope more OC gets posted to YC, instead of the boring old news articles.
Re: Show HN: My nodejs-supervisor like tool, written in Go
#5I'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.
Re: Show HN: My nodejs-supervisor like tool, written in Go
#6Very cool dude. I hope more OC gets posted to YC, instead of the boring old news articles.
Re: Show HN: My nodejs-supervisor like tool, written in Go
#7flag.StringVar(&path, "watch", ".", "path to be watched") flag.StringVar(&command, "command", "echo", "path to be watched") I think there may be a mistake?
Re: Show HN: My nodejs-supervisor like tool, written in Go
#8Re: Show HN: My nodejs-supervisor like tool, written in Go
#9flag.StringVar(&path, "watch", ".", "path to be watched") flag.StringVar(&command, "command", "echo", "path to be watched") I think there may be a mistake?
Re: Show HN: My nodejs-supervisor like tool, written in Go
#10I'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.
You might be interested in nodemon https://github.com/remy/nodemon
"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)