Documentation
¶
Overview ¶
Command app-shortlinks is a small, complete link shortener: an app that holds filex's link-shortener role (filex 0.60). It is the smallest app that uses every part of that role, and the one the screenshots of the setup wizard, "Get short link" and Reconfigure are taken with (e2e/shots/shortlinks.mjs).
- `setup` (a view with placement `setup`): one question, the alphabet a code is drawn from, kept in the app's own data;
- `shorten`: one code per filex link, drawn at random (pkg/pluginkit/shortcode) on the route's default address;
- `route`: a code answers a redirect to its link, `<code>+` a page that says where it goes, anything else a miss - and a link that has ended (link_live) is a miss too;
- the data is the app's own (`data_*`): Reconfigure and removing the app erase it, so `reset` has nothing left to do.
It exists to be read, and to be built:
GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o shortlinks.wasm ./examples/app-shortlinks # Admin → Plugins → Apps → Install an app → Upload files: # shortlinks.wasm and examples/app-shortlinks/filex-app.json
docs/APP-PLUGINS-API.md → The link-shortener role is the contract.
Click to show internal directories.
Click to hide internal directories.