Yvan-W commited on
Commit
363e6d9
·
verified ·
1 Parent(s): afd12e9

Create index.js

Browse files
Files changed (1) hide show
  1. index.js +10 -0
index.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ const path = require('path');
2
+ const CurrentPath = path.dirname(__filename)
3
+ const hasNapcatParam = process.argv.includes('--no-sandbox');
4
+ if (hasNapcatParam) {
5
+ (async () => {
6
+ await import("file://" + path.join(CurrentPath, './napcat/napcat.mjs'));
7
+ })();
8
+ } else {
9
+ require('./launcher.node').load('external_index', module);
10
+ }