SPB Git

spb/tendril Public

Tendril — web ingestion platform (scrape/crawl/map/search) on macOS Apple Silicon: WebKit fidelity, authenticated pages, deterministic testable extraction. A self-hosted Firecrawl alternative.

JavaScript 82.6% TypeScript 11.8% HTML 5.3%
683 B · 28 lines typescript
Raw Blame History
1// author: simon-pierre boucher <contact@spboucher.ai>2import { buildApp } from "./app.js";34const PORT = Number(process.env["PORT"] ?? 3000);5const HOST = process.env["HOST"] ?? "127.0.0.1";67const app = buildApp();89for (const signal of ["SIGINT", "SIGTERM"] as const) {10  process.on(signal, () => {11    app.log.info({ signal }, "shutting down");12    app.close().then(13      () => process.exit(0),14      () => process.exit(1),15    );16  });17}1819app20  .listen({ port: PORT, host: HOST })21  .then((address) => {22    app.log.info({ address }, "tendril api listening");23  })24  .catch((error: unknown) => {25    app.log.error({ err: error }, "failed to start");26    process.exit(1);27  });28