Skip to content

Instantly share code, notes, and snippets.

@a7ul
Last active June 13, 2018 07:18
Show Gist options
  • Save a7ul/7bced1b7f3092453b830978a39e600e3 to your computer and use it in GitHub Desktop.
Save a7ul/7bced1b7f3092453b830978a39e600e3 to your computer and use it in GitHub Desktop.
blog-on-node-addons-second
//index.js
const testAddon = require('./build/Release/testaddon.node');
module.exports = testAddon;
/* cppsrc/main.cpp */
#include <napi.h>
Napi::Object InitAll(Napi::Env env, Napi::Object exports) {
return exports;
}
NODE_API_MODULE(testaddon, InitAll)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment