Skip to content

Instantly share code, notes, and snippets.

@vroad
Forked from brendanashworth/binding.cc
Last active August 29, 2015 14:22
Show Gist options
  • Save vroad/64a6b9523bae5f559678 to your computer and use it in GitHub Desktop.
Save vroad/64a6b9523bae5f559678 to your computer and use it in GitHub Desktop.
#include <node.h>
#include <stdio.h>
using namespace v8;
void Exit(void* arg) {
printf("node::AtExit called\n");
}
void Initialize(Handle<Object> exports) {
node::AtExit(Exit);
}
NODE_MODULE(binding, Initialize)
{
"targets": [
{
"target_name": "binding",
"sources": [
"binding.cc"
]
}
]
}
var binding = require('./build/Release/binding');
process.exit(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment