reloading webapps

Skip to first unread message

francisco treacy

unread,
May 26, 2010, 6:45:27 AM5/26/10
to expre...@googlegroups.com
Hi all,

I've been successfully using the bind gem to reload my express webapp
whenever the source code changed. Now the problem is in my new
environment I run Ruby 1.9 -- and afaics bind is only 1.8 compatible.

I know the hot-reload subject has been present in the node mailing
list, though with no concrete outcome ... Just wondering what you guys
are using? If someone is into this, maybe a heads up on what you're
aware of (for either express or node itself).

(This is, in my opinion, one of the biggest drawbacks when it comes to
developing webapps in node).

Francisco

vision media [ Tj Holowaychuk ]

unread,
May 26, 2010, 10:07:42 AM5/26/10
to expre...@googlegroups.com
I just kill the app and restart in the terminal... doesnt bug me much since I usually have 95-ish% test coverage
in anything I write, so I can make sites without looking at a browser for quite a while. That
being said there are many alternatives to bind, you could use watch http://en.wikipedia.org/wiki/Watch_(Unix)


--
You received this message because you are subscribed to the Google Groups "Express" group.
To post to this group, send email to expre...@googlegroups.com.
To unsubscribe from this group, send email to express-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/express-js?hl=en.




--
Tj Holowaychuk
Vision Media
President & Creative Lead

Aaron Heckmann

unread,
May 26, 2010, 10:22:42 AM5/26/10
to expre...@googlegroups.com
I restart as well.
Aaron
http://clickdummy.net

Scott Taylor

unread,
May 26, 2010, 11:14:37 AM5/26/10
to expre...@googlegroups.com

Here's what I do:


It's a total hack and dies sometimes, but it seems to work out usually.

Notice that you'll need to change the name + path of the app you'd normally be running on line 16.

Scott

francisco treacy

unread,
May 27, 2010, 6:16:12 AM5/27/10
to expre...@googlegroups.com
Thanks all.

Scott: looks neat!

I'm just killing the app manually, but I'm going to give your script a
shot. Would be really helpful for express if we could set up that
would work just like Rails. I'd love to dive into it, problem is I
have a serious lack of time nowadays. We'll see =)

Francisco

2010/5/26 Scott Taylor <sc...@railsnewbie.com>:

Brian Ehmann

unread,
May 27, 2010, 10:59:00 AM5/27/10
to Express
You might want to give node-supervisor a try: http://github.com/isaacs/node-supervisor

just install it and do:
$ node-supervisor -w . -p app.js

Where -w is the file or folder to watch and -p is the node app to
restart when a watched file changes. If you pass a folder to the -w
param it will recursively search through the dir tree and watch all
*.js and *.node files. You can also pass a comma separated list of
files and folders to watch like: -w app.js,data-provider.js,lib.

one thing it doesn't do is restart if you add a new js file to a
folder... that's on my todo list

- Brian

On May 27, 6:16 am, francisco treacy <francisco.tre...@gmail.com>
wrote:

Reply all
Reply to author
Forward
0 new messages