Welcome to mirror list, hosted at ThFree Co, Russian Federation.

binding.cc « hello-world-function-export « addons « test - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dcdb6b8ce85314dbed387ff250a6936f1f38f0c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <node.h>
#include <v8.h>

using namespace v8;

Handle<Value> Method(const Arguments& args) {
  HandleScope scope;
  return scope.Close(String::New("world"));
}

void init(Handle<Object> exports, Handle<Object> module) {
  NODE_SET_METHOD(module, "exports", Method);
}

NODE_MODULE(binding, init);