Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Vitold S. vit1251

🏠
Working from home
View GitHub Profile
@vit1251
vit1251 / index.mjs
Created Dec 24, 2020
Import N-API extension in Node module source code
View index.mjs
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const addon = require('YOUR_ADDON_PATH');