Example node.js addon for event emitting

This just show an example on how to call JS functions from a C++ addon

Executing

be sure to have node-gyp installed

Initializing:

./update

Start example

./startup

Example result:

Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
still live
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
still live
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
Event emitted from C++ with arguments { err: undefined, result: 'someArg' }
now die