when app is running, server restarts when it exits or disconnects
This commit is contained in:
parent
0859d50942
commit
407a5cabf4
|
@ -52,11 +52,22 @@ function server() {
|
||||||
console.error(`server: ${data}`)
|
console.error(`server: ${data}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
proc.on('exit', () => {
|
||||||
|
console.log('Restarting...');
|
||||||
|
server();
|
||||||
|
})
|
||||||
|
|
||||||
|
proc.on('disconnect', () => {
|
||||||
|
console.log('Restarting...');
|
||||||
|
server();
|
||||||
|
})
|
||||||
|
|
||||||
process.on('exit', () => {
|
process.on('exit', () => {
|
||||||
proc.kill()
|
proc.kill()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function installCLI() {
|
function installCLI() {
|
||||||
const symlinkPath = '/usr/local/bin/ollama'
|
const symlinkPath = '/usr/local/bin/ollama'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue