简体   繁体   中英

Use Node.js as an interpreter

I would like to embed NodeJS in my application. The reason i would like to use NodeJS and not just the V8 directly, is because of the extensions that exist for NodeJS. To do that i understand that i need to compile NodeJS with GYP. Got it. But how do i work with it? is there a static lib to link to? how to start it up? say i want to provide it with a V8 context, how do i pass it?

a bit at a loss here. hope for help.

Note - i want to activate nodejs from my C++ code, not the other way around. i understand extensions, this is not what i want.

Regards, Gal.

As I got from this question the problem of immediate linking with node.js is still unsolved. Actually the workaround may be running it in a separated process like an ordinary command line application. You may save your script to file, pass it as cmdline argument, then obtain std output from the node.js executable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM