Skip to content

lmshao/Node.js-Cpp-Addons

Repository files navigation

Node.js-Cpp-Addons

Call C++ function from Node.js

Reference: Node.js Documentation C++ Addons

Install node-gyp

npm install -g node-gyp

Build C++ code

node-gyp configure build
// node-gyp configure
// node-gyp build

Examples

HelloWorld

Just return a string "Hello World!" from C++.

CommonFunctions

A function to calculate Fibonacci sequence with:

  • Passing arguments
  • Throwing exceptions
  • Callbacks

CppClassWrapper

Add some students to a class (Clazz), and finally show who are in the class.

About

Call C++ function from Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published