Using node-main

19 views
Skip to first unread message

Tim Caswell

unread,
Nov 6, 2012, 4:34:31 PM11/6/12
to node-...@googlegroups.com
I was wondering what is the proper way to use node-main.  I think it solves the problem I have.

I want to launch an application that runs some node services in the background.  I want these services to live independent lifetimes to the various windows.  But I want my windows to communicate with the background node process.

As far as I can tell, node-main starts a node process with the correct lifetime as what I want (page refreshes don't affect it), but the first main window is started before the node-main script is finished putting things in global.  Do I have to watch for some flag in a setInterval loop in my webkit code or is there a better way?

Roger

unread,
Nov 6, 2012, 4:44:39 PM11/6/12
to node-...@googlegroups.com
Hi Tim,

I am working on ensuring node-main starts before loading of first window. Is that the behavior excepted by you? It's tracked by Issue #36.

But keeping node-main running across page navigation is still on my TODO list, but it's working for you? I'll check it.

Also we have related #128, which is harder to fix.

Regards

Roger



From: Tim Caswell <t...@creationix.com>
Sent: Wed Nov 07 05:34:31 格林尼治标准时间+0800 2012
To: node-...@googlegroups.com
Subject: [node-webkit] Using node-main

Tim Caswell

unread,
Nov 6, 2012, 5:27:07 PM11/6/12
to node-...@googlegroups.com
On Tue, Nov 6, 2012 at 3:44 PM, Roger <wen...@gmail.com> wrote:
Hi Tim,

I am working on ensuring node-main starts before loading of first window. Is that the behavior excepted by you? It's tracked by Issue #36.

Yes, thank you.  That would simplify a lot for me. 

But keeping node-main running across page navigation is still on my TODO list, but it's working for you? I'll check it.

It appears to be fine between refreshes
 
Also we have related #128, which is harder to fix.

That would be neat, but it's not a huge problem if it's too hard to implement. 
Reply all
Reply to author
Forward
0 new messages