14 lines
433 B
JavaScript
14 lines
433 B
JavaScript
const fs = require('fs');
|
|
const { spawn } = require('child_process');
|
|
|
|
const logFile = '/mnt/fam/SERVER/IfixKartEcommerce/docs/12-ai/logs/admin.log';
|
|
const out = fs.openSync(logFile, 'a');
|
|
|
|
const child = spawn('npx', ['next', 'dev', '-p', '3022'], {
|
|
cwd: __dirname,
|
|
stdio: ['pipe', out, out],
|
|
detached: true
|
|
});
|
|
|
|
child.unref();
|
|
console.log('Persistent Next.js dev server running on port 3022 with open pipe, PID:', child.pid);
|