forked from IrosTheBeggar/mStream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli-boot-wrapper.js
executable file
·41 lines (35 loc) · 1.1 KB
/
cli-boot-wrapper.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env node
"use strict";
// Check if we are in an electron environment
if (process.versions["electron"]) {
// off to a separate electron boot environment
require("./mstream-electron.js");
return;
}
const config = require("./modules/config/configure-commander.js").setup(process.argv);
// User ran a maintenance operation. End the program
if (!config){
return;
}
// Check for errors
if (config.error) {
console.log(config.error);
process.exit(1);
return;
}
const colors = require('colors');
console.clear();
console.log(colors.bold(`
v4.6.1 ____ _
_ __ ___ / ___|| |_ _ __ ___ __ _ _ __ ___
| '_ \` _ \\\\___ \\| __| '__/ _ \\/ _\` | '_ \` _ \\
| | | | | |___) | |_| | | __/ (_| | | | | | |
|_| |_| |_|____/ \\__|_| \\___|\\__,_|_| |_| |_|`));
console.log(colors.bold(` Paul Sori - ${colors.underline('[email protected]')}`));
console.log();
console.log(colors.magenta.bold('Find a bug? Report it at:'));
console.log(colors.underline('https://github.com/IrosTheBeggar/mStream/issues'));
console.log();
// Boot the server
const serve = require("./mstream.js");
serve.serveIt(config);