mirror of https://github.com/microsoft/vcpkg.git
15 lines
351 B
C++
15 lines
351 B
C++
#include <napi.h>
|
|
|
|
Napi::String Method(const Napi::CallbackInfo& info) {
|
|
Napi::Env env = info.Env();
|
|
return Napi::String::New(env, "world");
|
|
}
|
|
|
|
Napi::Object Init(Napi::Env env, Napi::Object exports) {
|
|
exports.Set(Napi::String::New(env, "hello"),
|
|
Napi::Function::New(env, Method));
|
|
return exports;
|
|
}
|
|
|
|
NODE_API_MODULE(hello, Init)
|