diff --git a/main.ts b/main.ts index 7704dd6..23b69cd 100644 --- a/main.ts +++ b/main.ts @@ -17,6 +17,9 @@ import { fromFileUrl, join } from "path/mod.ts"; import { prepareSecretKey } from "./util/secret.ts"; import { serve } from "http/server.ts"; +import { user_command } from "./user.ts"; +import { key_out_cmd } from "./keyout.ts"; + const github_markdown= await Deno.readTextFile(join(fromFileUrl(import.meta.url), "..", "static", "github-markdown.css")) const CSSPlugin: Plugin = { @@ -45,7 +48,7 @@ async function startServer(manifest: Manifest, options: StartOptions = {}){ } } -async function start({port = 8000, hostname = "localhost"}: {port?: number, hostname?: string}){ +async function start({port = 8000, hostname = "localhost"}: {port?: number, hostname?: string} = {}){ await startServer(manifest, { plugins: [twindPlugin(twindConfig), CSSPlugin], port: port, hostname: hostname, @@ -77,10 +80,11 @@ if (import.meta.main){ }); } ) - //.command("user") + .command("user", user_command) + .command("keyout", key_out_cmd) ; await cmd.parse(Deno.args); } else { - await start({}); + await start(); }