Skip to main content
Everything AwaitIO needs is set in one place, new AwaitIO(). Keep it in its own file, app.ts: action files import the instance for their typed io, and the server file starts it with listen().
app.ts

Options

The app checks the options when it is created and throws with a message naming the one that is wrong, so a typo stops the server before anyone logs in.

Extra tags in the head

head is HTML the server adds, as written, to the end of the <head> of every page it sends: an analytics script, Open Graph tags for link previews, your own favicon.
app.ts
Anyone who opens the page can read it, logged in or not, so keep secrets out of it. The tab title still comes from name.