merge routes-packages
This commit is contained in:
26
assistant/src/module/local-apps/test/pm2.ts
Normal file
26
assistant/src/module/local-apps/test/pm2.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { Pm2Manager } from '../src/modules/pm2';
|
||||
|
||||
const manager = new Pm2Manager({
|
||||
appName: 'test',
|
||||
script: 'test.js'
|
||||
});
|
||||
|
||||
const main = async () => {
|
||||
const list = await manager.list();
|
||||
console.log('list', list);
|
||||
// manager.restart()
|
||||
};
|
||||
|
||||
// main();
|
||||
|
||||
const pm2Demo = new Pm2Manager({
|
||||
appName: 'pm2-demo'
|
||||
});
|
||||
|
||||
const pm2Restart = async () => {
|
||||
const list = await pm2Demo.list();
|
||||
console.log('list', list);
|
||||
pm2Demo.restart()
|
||||
}
|
||||
|
||||
pm2Restart();
|
||||
Reference in New Issue
Block a user