Node.jsのモジュールをC++で書く際に調べたことをメモ。 ソース とりあえず練習で書いてみた。 #include <v8.h> #include <node.h> #include <iostream> using namespace v8; class Hello: node::ObjectWrap { public: static void Init(const Handle<Object> target) { HandleScope scope; Local < FunctionTemplate > t = FunctionTemplate::New(New); t->InstanceTemplate()->SetInternalFieldCount(1); NODE_SET_PROTOTYPE_METHOD(t, "say", Say); target->Set(String