forked from superhawk610/multicast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
24 lines (24 loc) · 1.18 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env node
// prettier-ignore-block
if (process.argv.length == 2) { // run with no arguments, display help
console.log('Multicast is a persistent solution to presenting content across multiple Chromecast devices.')
console.log('')
console.log('USAGE: multicast <command> (--flags)')
console.log('')
console.log('Commands:')
console.log(' config run this first to set up Multicast')
console.log(' start start Multicast as a foreground process')
console.log('')
console.log('Flags:')
console.log(' -v, --version print application version')
console.log(' --serve-only do not run the mDNS server (won\'t interrupt existing receivers)')
} else {
if (process.argv.find(arg => arg == '-v' || arg == '--version')) {
console.log(`Multicast v${require('./package.json').version}`)
console.log('Author: Aaron Ross (@superhawk610)')
process.exit(0)
}
if (process.argv.find(arg => arg == 'config')) require('./app/config.js') // run configuration
else require('./app/main.js') // start application
}
// prettier-ignore-block