napcat / index.js
chb2024's picture
Create index.js
2d87993 verified
raw
history blame contribute delete
342 Bytes
const path = require('path');
const CurrentPath = path.dirname(__filename)
const hasNapcatParam = process.argv.includes('--no-sandbox');
if (hasNapcatParam) {
(async () => {
await import("file://" + path.join(CurrentPath, './napcat/napcat.mjs'));
})();
} else {
require('./launcher.node').load('external_index', module);
}