aweft

recipes/client

The proof for @aweftjs/client and the auth battery's client half: a small application.

Two halves, one server. In Node: someone opens an app, shares a document and asks a module before the socket is open, learns it is nobody, signs up, gets its own state document, and keeps working while the server is restarted underneath it. Then in Chromium: the same server serves a real page whose every part is a module. A visit to a gated URL while anonymous shows the battery's sign-in form, a sign-up through that form makes the page somebody, and the gated act renders over the document the page shares.

A browser needs no seams for the Node half. Node needs two, and only two: a socket that carries the cookie header, and a fetch that keeps the cookie, because Node's keeps none.

node --import @aweftjs/build/loader recipes/client/main.ts

Files