Skip to main content
Module

x/fastro/cli/fastro.ts

Fast and simple web application framework for deno
Go to Latest
File
import * as handler from "./handlers.ts";import * as help from "./help.ts";
const { commands: [command], port, help: helpMsg, version, app, name, prefix,} = handler .getArguments( Deno.args, );
if (command && version) { console.log(`'fastro ${command} --version' is not valid command`);} else if (command && helpMsg) { if (command === "init") help.initHelp(); if (command === "serve") help.serveHelp(); if (command === "createHandler") help.handlerHelp();} else { if (command === "init") handler.init(app); if (command === "createHandler") handler.createHandler(name, prefix); if (command === "serve") handler.serve(port);}
if (!command && helpMsg) help.helpCmd();if (!command && version) handler.getVersion();else if (!command && !helpMsg) help.defaultHelp();