2013-01-25 00:40:58 +01:00
|
|
|
#include <node.h>
|
|
|
|
#include <v8.h>
|
|
|
|
|
2015-08-18 20:29:10 +02:00
|
|
|
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
2015-08-18 21:02:52 +02:00
|
|
|
v8::Isolate* isolate = args.GetIsolate();
|
2015-08-18 20:29:10 +02:00
|
|
|
args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world"));
|
2013-01-25 00:40:58 +01:00
|
|
|
}
|
|
|
|
|
2015-07-18 11:34:16 +02:00
|
|
|
void init(v8::Local<v8::Object> exports, v8::Local<v8::Object> module) {
|
2013-01-25 00:40:58 +01:00
|
|
|
NODE_SET_METHOD(module, "exports", Method);
|
|
|
|
}
|
|
|
|
|
2017-09-05 22:53:06 +02:00
|
|
|
NODE_MODULE(NODE_GYP_MODULE_NAME, init)
|