Use C++ in NodeJS

preview_player
Показать описание
Learn a tiny bit of C++ and how it can interact with NodeJS.
- nan.h
- build C++ for NodeJS

# Example Project

#cplusplus #javascript #nodejs #node
Рекомендации по теме
Комментарии
Автор

Thanks for providing actual boilerplate code for people to play around with!

dbaldwin
Автор

Hello there, I was recently added a cpp addon on my existing app and the thing is it won't able to run on production. but, it works fine on production. do you have any idea??? its urgent! Thank you in advance!

maf
Автор

Hi, one question to the performance:
Could it be that the c++ compiler has optimized the loop out? you only set the variable count several times but never use it again. Furthermore the variable is not marked as volatile (I'm not absolutely sure about this =>), but that could be a hint for the compiler that it will be touched somewhere else, that is not provided.

MarianVennen
Автор

Both JS and C++ versions are not equivalent because of the output. The "console.log" is an extremely rich method full of functionality, while the C++ "cout" just prints strings. So, if you change "console.log()" to "process.stdout.write()" you'll get very similar timing results.

sentinelaenow
Автор

Is there a helper function to manipulate all the data in C++ inside javascript? I see preamble.js is used for the Language C but not sure if it supports C++

pixel
Автор

Error: Cannot find module './build/Release/hello.node'

Avighna
Автор

Hello sir... Time killing script for SSMMS site... In this is site we can book the sand Dd's in online proces. But at that booking time server is verry slow... I can't book the sand. So can you plz write the code for time killing... Any doubts in this site I will give the clear information

tufu
Автор

How to create frontend in react js for my c++ code

newborn
Автор

Hey, i tried adding another file like ricky.cc but to run the actual code in it there seems to be an issue with the build->Release->hello.node thing. Shouldn't there be a file called build->release->ricky.node? Please help

vasanth
welcome to shbcf.ru