mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
chord/next/app: startApp and startWorker with the fixed app layout, worker kinds, AppInfo and WorkerInfo; sessions (hashed tokens, rolling cookies, bearer tokens), the one-time owner link, the owner token file, device pairing; Files per host with ordered chunked uploads; export and import per address; plugin roots, installs and applyChanges; optional users, invite and ephemeral login facets. HTTP: deny by default (public routes and sockets), remoteAddress, readSignedCookie. Examples 53-55.
13 lines
656 B
TypeScript
13 lines
656 B
TypeScript
// The worker entry of the app kit's tests: `startWorker` with the tests' API (Chord's surface and the kit's objects as
|
|
// `@test/app/v1`, as the server's tests have it).
|
|
|
|
import * as chordNext from "../../../../src/next/index.ts";
|
|
import { AppInfo, Files, Sessions, startWorker, WorkerInfo } from "../../../../src/next-node/app/index.ts";
|
|
|
|
const v1 = { ...chordNext, AppInfo, WorkerInfo, Files, Sessions };
|
|
|
|
startWorker({
|
|
api: { name: "@test/app", versions: ["v1"], modules: { "@test/app/v1": v1 } },
|
|
kinds: { server: { platform: "node" }, worker: { platform: "node" }, teamworker: { platform: "node" } },
|
|
onError: (error) => console.error(error),
|
|
});
|