mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-08 13:31:28 +03:00
Switched nodemon to foreverjs to hopefully enable restarting internally and fix runtime errors
This commit is contained in:
@@ -335,18 +335,11 @@ async function startServer() {
|
||||
}
|
||||
|
||||
async function restartServer(is_update = false) {
|
||||
const restartProcess = () => {
|
||||
spawn('node', ['app.js'], {
|
||||
detached: true,
|
||||
stdio: 'inherit'
|
||||
}).unref()
|
||||
process.exit()
|
||||
}
|
||||
|
||||
logger.info(`${is_update ? 'Update complete! ' : ''}Restarting server...`);
|
||||
|
||||
// the following line restarts the server through nodemon
|
||||
fs.writeFileSync(`restart${is_update ? '_update' : '_general'}.json`, 'internal use only');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
async function updateServer(tag) {
|
||||
|
||||
Reference in New Issue
Block a user