How to call the node.js APIs and modules from C++ with embedded node.js as a library

67 views
Skip to first unread message

Peter

unread,
Aug 19, 2014, 8:43:55 PM8/19/14
to nod...@googlegroups.com
Hello,

I built node.js as a static library and linked it to my C++ application. This application is a wrapper, built with the V8 engine. It is loaded as a library from another platform(also written in C++) and exposes the methods of that platform, so these methods can be called from JavaScript.
I used the advise from the link below, built and then linked the node.js as static library into my application, but without modifying the node.cc file:
https://github.com/hoonto/node-embed
I can't understand from the Guide if it is possible to invoke direct the node.js APIs from C++.

I am working with the unstable version of node.js (0.11.14) because i need the new version of v8.h in it.

So how can I call the APIs or the modules(libraries) in node.js from C++ direct, without to invoke node::Start() with a JavaScript file as an argument?

Thanks,
Peter Stoyanov

Reply all
Reply to author
Forward
0 new messages