this repo has no description smallweb.run
smallweb
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove cli app, add plugin

pomdtr b1ba6075 5ab9bf4d

+16 -7
+8
examples/.smallweb/plugins/edit.sh
··· 1 + #!/bin/sh 2 + 3 + if [ $# -eq 0 ]; then 4 + echo "Usage: edit.sh <app>" 5 + exit 1 6 + fi 7 + 8 + exec code "$SMALLWEB_DIR/$1"
-6
examples/cli/main.ts
··· 1 - export default { 2 - fetch: () => new Response("This app is supposed to be used from the cli: smallweb run cli"), 3 - run() { 4 - console.log("Hello, world!"); 5 - } 6 - }
+8 -1
examples/ls/main.ts
··· 47 47 }) 48 48 } 49 49 50 + async function handleCommand() { 51 + const { SMALLWEB_DIR } = Deno.env.toObject() 52 + const entries = await Array.fromAsync(Deno.readDir(SMALLWEB_DIR)) 53 + console.log(entries.filter(entry => !entry.name.startsWith(".")).map(entry => entry.name).join("\n")) 54 + } 55 + 50 56 export default { 51 - fetch: handleRequest 57 + fetch: handleRequest, 58 + run: handleCommand, 52 59 }