mirror of
https://github.com/koush/scrypted.git
synced 2026-02-09 08:42:19 +00:00
24 lines
487 B
JavaScript
Executable File
24 lines
487 B
JavaScript
Executable File
#! /usr/bin/env node
|
|
|
|
const scrypted = require('./index.js');
|
|
|
|
function report(err) {
|
|
process.nextTick(() => {
|
|
throw new Error(err);
|
|
});
|
|
}
|
|
|
|
if (process.argv.length < 3) {
|
|
report('Usage: npm run scrypted-deploy-debug <ip_address> [main.js]');
|
|
return 1;
|
|
}
|
|
|
|
scrypted.deploy(process.argv[2], true)
|
|
.then(() => {
|
|
return scrypted.debug(process.argv[2], process.argv[3]);
|
|
})
|
|
.catch((err) => {
|
|
console.error(err.message);
|
|
report('deploy + debug failed');
|
|
});
|