Files
diachron/backend/app.ts
Michael Wolf 91780b6dca Add formatted error pages for console and browser
Errors now show app frames highlighted with relative paths and library
frames collapsed, both in ANSI on the console and as a styled HTML page
in the browser. Process-level uncaughtException/unhandledRejection
handlers also use the formatter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 18:07:41 -05:00

32 lines
616 B
TypeScript

import{cli}from'./diachron/cli'
import { formatError } from './diachron/errors';
process.on('uncaughtException', (err) => {
console.error(formatError(err));
process.exit(1);
});
process.on('unhandledRejection', (reason) => {
console.error(formatError(reason));
});
import { core } from "./diachron/core";
import { routes } from "./routes";
import {makeApp}from'./diachron/app'
const app = makeApp({routes});
core.logging.log({ source: "logging", text: ["1"] });
app.listen(cli.listen.port, cli.listen.host, () => {
console.log(`Listening on ${cli.listen.host}:${cli.listen.port}`);
});