Created
November 27, 2014 08:54
-
-
Save XadillaX/dcf9f74ef03948b47c79 to your computer and use it in GitHub Desktop.
Node.js C++ addon skeleton.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <node.h> | |
#include <v8.h> | |
#include <cstdio> | |
#include <iostream> | |
#include <cstdlib> | |
#include <string> | |
#include <cstring> | |
using namespace std; | |
Handle<Value> ExportFunction(const Arguments& args) | |
{ | |
HandleScope scope; | |
return scope.Close(Undefined()); | |
} | |
void CreateExports(Handle<Object> exports) | |
{ | |
exports->Set(String::NewSymbol("exportFunction"), | |
FunctionTemplate::New(ExportFunction)->GetFunction()); | |
} | |
NODE_MODULE({{MODULE_NAME}}, CreateExports); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment