I would recommend that for questions specific to Node itself like this, you should check out https://github.com/nodejs/help first before asking here. There, they can help you with a wide variety of things, including things like this, and you're more likely to get better answers out of it. They can help you with both native addons and JavaScript-related questions, and they can help you with quite a few things.
Also, I thought I'd point out that for this particular case, if your server is in fact Node, I'd suggest using `process.env` instead (see https://nodejs.org/api/process.html#process_process_env). This does basically what you want, without much ceremony (and as a couple pros, it works across all platforms and it doesn't even require any C++ code). On Thursday, May 17, 2018 at 8:39:28 PM UTC-4, Osman Zakir wrote: > > Hi, > > Thanks for the answer. > > I think this can help me. I also need to know if I need to actually make > a C++ addon for Node.js or if I just need to #include the v8.h header in > C++ and require() v8 in JavaScript and then expose the variable from C++ to > JavaScript that way without also making a Node.js addon (I'm using > Browserify, so I can use require() client-side in my code). > > On Sunday, May 13, 2018 at 6:37:38 AM UTC+3, Anoop R. S. wrote: >> >> Hi, >> Please see if this is of any help. I am not sure whether this is what you >> meant. >> >> https://github.com/anoop-rs/C-ObjectAccessUsingV8 >> >> regards, >> Anoop R. S. >> >> On Sunday, 13 May 2018 00:05:11 UTC+5:30, Osman Zakir wrote: >>> >>> My issue is as stated in the title. Is it possible to do this using >>> V8? If so, how? Thanks in advance for any replies and/or help. >>> >>> Note: I have a Google API key and a currency API access key stored in >>> environment variables I want to pass them to the client-side code. The >>> Google API key has to go the HTML page somehow and the other one to the >>> JavaScript code. >>> >> -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.