package main // Exhibit 17. A creator makes an app on apps (apps., "New app"): apps files the request with // account's assertion for the person, and root makes everything an app is (tools README, "rc new"): // the live, staging and preview addresses with certificates, the repo with the seed pushed through // the ordinary hooks, so the new address answers with the seed's placeholder page at once. The clone // line is on the new app's page. // // A person checks this: creating apps is invitation only, and an app the robot made could not be // taken back (apps offers no "remove"; that is root's `rc rm`), so a self-check would leave one behind // every time. On staging apps acts in a pretend world and creates nothing. import "ratcloud:rc" e17 :: proc() -> Exhibit { return { n = 17, wing = "Building", kind = "human", title = "A new app in a minute", promise = "Creating an app gives it an address, a staging twin and a repo to push to.", block = "apps's New app form asks root (through apps's spool, with account's word for who you are) for a new app: its addresses with certificates, and a repo with a first working page already pushed.", src = {"e17_new_app.odin", #load("e17_new_app.odin", string)}, show = proc(me: ^rc.User) -> string { staging := "" if env().env == "live" else `

This is staging: its apps acts in a pretend world and creates nothing. Try it on the live zoo.

` return cat(`

On apps, New app takes a name (creators only; the owner invites them). Within a minute https://<name>.`, h(env().domain), `/ and its -staging twin answer with a placeholder page, and the app's page there shows the line to clone it.

`, staging, seen_button(17, me, "I made an app and its address answered")) }, } }