mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2025-07-13 07:04:50 -06:00
30 lines
523 B
JavaScript
30 lines
523 B
JavaScript
var argv = require('optimist').argv
|
|
|
|
|
|
const operations = {
|
|
// 'create': require('./create'),
|
|
'help': require('./help'),
|
|
'server': require('./server'),
|
|
'pm2': require('./pm2'),
|
|
}
|
|
|
|
|
|
function main() {
|
|
try{
|
|
|
|
var operation = argv._[0]
|
|
if (!operation) operation = 'help'
|
|
if (!operations[operation]) {
|
|
console.error('Unknown operation: ' + operation)
|
|
operation = 'help'
|
|
}
|
|
operations[operation](argv)
|
|
} catch (e) {
|
|
console.error(e.message || e)
|
|
process.exit(1)
|
|
}
|
|
}
|
|
|
|
main()
|
|
|