Skip to main content
Module

x/fastro/fastro.ts

Fast and simple web application framework for deno
Go to Latest
File
import * as handler from "./core/handlers.ts";import * as help from "./core/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(); if (command === "deploy") help.deployHelp();} else { if (command === "init") handler.init(app); if (command === "createHandler") handler.createHandler(name, prefix); if (command === "serve") handler.serve(port); if (command === "deploy") handler.deployHandler();}
if (!command && helpMsg) help.helpCmd();if (!command && version) handler.getVersion();else if (!command && !helpMsg) help.defaultHelp();