bemson/Flow — Issue #10: Flow and nodejs
Author: stigi
Created: 2011-11-20 21:11:22+00:00
State: open

There are several issues when using flow within nodejs.
For one, it would be nice if flow could be integrated as a module (npm would be great! :))
Therefore it would also be necessary that it wouldn't expect GSet in the it's scope but rather require it too.

The other thing is, it expect's this to be a window. This is not the case in nodejs.

I worked around all of this by adding the following lines:

```javascript
GSet = require('../deps/gset-min.js').GSet;
this.clearTimeout = global.clearTimeout;
this.setTimeout = global.setTimeout;
```

I've got one more issue where ```_main``` isn't called, i'll try to debug into this.

Just so you know :)

Ullrich