Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
vector-web-setup.js 1.25 KB
Copy Edit Raw Blame History
Anant Kaushik authored 2020-08-04 10:56 . Configureable IP
#!/usr/bin/env node
/* Copyright (c) 2019-2020 Digital Dream Labs. See LICENSE file for details. */
var commander = require("commander");
const program = new commander.Command();
program
.version("1.0.0", "-v, --version")
.description(
" __ ________ _____ _______ ____ _____ \n" +
" \\ \\ / / ____/ ____|__ __/ __ \\| __ \\ \n" +
" \\ \\ / /| |__ | | | | | | | | |__) |\n" +
" \\ \\/ / | __|| | | | | | | | _ / \n" +
" \\ / | |___| |____ | | | |__| | | \\ \\ \n" +
" \\/ |______\\_____| |_| \\____/|_| \\_\\ \n\n"
)
.addCommand(require("./tools/configure.js"))
.addCommand(require("./tools/ota.js").otaAdd)
.addCommand(require("./tools/ota.js").otaSync)
.addCommand(require("./tools/ota.js").otaApprove)
.exitOverride(() => {
process.exit(0);
});
program
.command("serve")
.description("Serve the vector websetup")
.option("-p, --port <number>", "port to serve the setup on", 8000)
.option(
"-ip, --ip-address <addr>",
"address to serve the setup on",
"0.0.0.0"
)
.action((options) => {
try {
require("./tools/run.js")(options.port, options.ipAddress);
} catch (err) {
console.log(err);
}
});
program.parse(process.argv);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化