mirror of
https://github.com/IrosTheBeggar/mStream.git
synced 2025-10-27 07:31:02 +00:00
28 lines
568 B
JavaScript
Executable File
28 lines
568 B
JavaScript
Executable File
#!/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;
|
|
}
|
|
|
|
var program = require("./modules/config/configure-commander.js").setup(process.argv);
|
|
|
|
// User ran a maintenance operation. End the program
|
|
if(!program){
|
|
return;
|
|
}
|
|
|
|
// Check for errors
|
|
if (program.error) {
|
|
console.log(program.error);
|
|
process.exit(1);
|
|
return;
|
|
}
|
|
|
|
// Boot the server
|
|
const serve = require("./mstream.js");
|
|
serve.serveit(program);
|