Created
October 25, 2017 05:02
-
-
Save ramirezd42/38ae06bd5064bdce88234c16e07d2587 to your computer and use it in GitHub Desktop.
ex_0
This file contains hidden or 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 <nan.h> | |
void Method(const Nan::FunctionCallbackInfo<v8::Value>& info) { | |
info.GetReturnValue().Set(Nan::New("world").ToLocalChecked()); | |
} | |
void Init(v8::Local<v8::Object> exports) { | |
exports->Set(Nan::New("hello").ToLocalChecked(), | |
Nan::New<v8::FunctionTemplate>(Method)->GetFunction()); | |
} | |
NODE_MODULE(hello, Init) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment