1
0
mirror of https://github.com/c9fe/22120.git synced 2024-10-03 21:57:13 +02:00

3.0.xx new version with fixes

This commit is contained in:
Cris Stringfellow 2023-07-23 10:19:34 +08:00
parent defecd4161
commit 6cea6c920b
No known key found for this signature in database

View File

@ -1,6 +1,7 @@
#!/usr/bin/env node
const os = require('os');
const path = require('path');
const { spawn } = require('child_process');
// Checking if node_modules directory exists
@ -20,5 +21,5 @@ const memoryAllocation = Math.floor((totalMemory / (1024 * 1024)) * 0.8); // Con
console.log(`Index can use up to: ${memoryAllocation}MB RAM`);
// Running the application
spawn('node', [`--max-old-space-size=${memoryAllocation}`, 'build/diskernet.mjs'], { stdio: 'inherit' });
spawn('node', [`--max-old-space-size=${memoryAllocation}`, path.resolve(__dirname, 'build', 'diskernet.mjs')], { stdio: 'inherit' });