2013-01-25 07:40:58 +08:00
|
|
|
#include <node.h>
|
|
|
|
#include <v8.h>
|
|
|
|
|
|
|
|
using namespace v8;
|
|
|
|
|
2014-01-19 06:49:18 +08:00
|
|
|
void Method(const FunctionCallbackInfo<Value>& args) {
|
|
|
|
Isolate* isolate = Isolate::GetCurrent();
|
|
|
|
HandleScope scope(isolate);
|
|
|
|
args.GetReturnValue().Set(String::NewFromUtf8(isolate, "world"));
|
2013-01-25 07:40:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void init(Handle<Object> exports, Handle<Object> module) {
|
|
|
|
NODE_SET_METHOD(module, "exports", Method);
|
|
|
|
}
|
|
|
|
|
|
|
|
NODE_MODULE(binding, init);
|