mirror of
https://github.com/koush/scrypted.git
synced 2026-02-10 09:12:03 +00:00
21 lines
380 B
JavaScript
Executable File
21 lines
380 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 <ip_address>');
|
|
return 1;
|
|
}
|
|
|
|
scrypted.deploy(process.argv[2])
|
|
.catch((err) => {
|
|
console.error(err.message);
|
|
report('deploy failed');
|
|
});
|