mirror of
https://github.com/openziti/zrok.git
synced 2025-06-21 18:21:34 +02:00
lint (#893)
This commit is contained in:
parent
56b8d1e92c
commit
8ca598ab3a
@ -10,13 +10,7 @@ import {
|
|||||||
ShareRequest
|
ShareRequest
|
||||||
} from "@openziti/zrok";
|
} from "@openziti/zrok";
|
||||||
|
|
||||||
const program = new Command();
|
const httpServer = async () => {
|
||||||
|
|
||||||
program
|
|
||||||
.command("http-server")
|
|
||||||
.version("1.0.0")
|
|
||||||
.description("A simple HTTP server example, sharing directly to a zrok share")
|
|
||||||
.action(async () => {
|
|
||||||
let root = loadRoot();
|
let root = loadRoot();
|
||||||
await init(root)
|
await init(root)
|
||||||
.catch((err: Error) => {
|
.catch((err: Error) => {
|
||||||
@ -37,6 +31,8 @@ program
|
|||||||
process.on("SIGINT", async () => {
|
process.on("SIGINT", async () => {
|
||||||
deleteShare(root, shr);
|
deleteShare(root, shr);
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
|
const program = new Command();
|
||||||
|
program.command("http-server").description("A simple HTTP server example, sharing directly to a zrok share").action(httpServer);
|
||||||
program.parse(process.argv);
|
program.parse(process.argv);
|
@ -13,8 +13,6 @@ import {
|
|||||||
} from "@openziti/zrok";
|
} from "@openziti/zrok";
|
||||||
import readlineSync = require('readline-sync');
|
import readlineSync = require('readline-sync');
|
||||||
|
|
||||||
const program = new Command();
|
|
||||||
|
|
||||||
const copyto = async () => {
|
const copyto = async () => {
|
||||||
let text = readlineSync.question("enter some text: ");
|
let text = readlineSync.question("enter some text: ");
|
||||||
let root = loadRoot();
|
let root = loadRoot();
|
||||||
@ -36,5 +34,6 @@ const copyto = async () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const program = new Command();
|
||||||
program.command("copyto").version("1.0.0").description("serve a copy buffer").action(copyto);
|
program.command("copyto").version("1.0.0").description("serve a copy buffer").action(copyto);
|
||||||
program.parse(process.argv);
|
program.parse(process.argv);
|
Loading…
x
Reference in New Issue
Block a user