diff --git a/doc/node-gyp.md b/doc/node-gyp.md index 851b3179b..5d77dfa60 100644 --- a/doc/node-gyp.md +++ b/doc/node-gyp.md @@ -58,10 +58,12 @@ Napi::Object Init(Napi::Env env, Napi::Object exports) { /** * This code defines the entry-point for the Node addon, it tells Node where to go * once the library has been loaded into active memory. The first argument must -* match the "target" in our *binding.gyp*. The second argument points to the -* function to invoke. +* match the "target" in our *binding.gyp*. Using NODE_GYP_MODULE_NAME ensures +* that the argument will be correct, as long as the module is built with +* node-gyp (which is the usual way of building modules). The second argument +* points to the function to invoke. The function must not be namespaced. */ -NODE_API_MODULE(myModule, Init) +NODE_API_MODULE(NODE_GYP_MODULE_NAME, Init) ``` ## **node-gyp** reference