Two passes over the repo, one editorial and one for accuracy. Prose (the avoid-ai-writing pass) - Replace ~250 em-dash-shaped " - " splices in comments, docs and UI copy with real punctuation. Paired dashes reading as parentheticals become parentheses. - Remove the remaining em dashes from code comments, CI and compose files, CLAUDE.md, and the legal pages. Bolded-lead-term list items keep theirs: there the dash is typography, not a splice. - Drop the Tier-1 filler: "actionable", "genuinely", "genuine", "deep dive", "showcase". Each one is now the specific thing it was standing in for. - Remove the coffee emoji from the README, the support modal and the landing page nav. - Relabel the "Deep dive" buttons in Archive and Research as "Object dossier", which is what the destination is called everywhere else. API docs, checked against the code rather than from memory - nox/docs/reference/http-api.md said the Nox routes need no auth. They do: real mode requires a bearer token AND confirmed: true. Documented both gates, the 401/403/404/503 responses, the /run summary field, the 200 parse-error diagnostic, and the two endpoints missing entirely (docs-search, docs/<path>). - cli.md conflated exit 1 and exit 3, and never documented --help/-h. - runtime-api.md implied every run() option was required and showed a diagnostic without suggest/seeAlso. - routes/nox.js listed 3 of its 6 endpoints, and its run-stream comment described a GET with the source in a query string. It is a POST. Standardization - Module header with a purpose line and an endpoint map on the 17 route files that had none. The 10 that already had one set the format. - engines: node >=22 on server and client, matching root, parser, runtime. - CLAUDE.md pointed at server/src/db/ and server/src/drivers/, neither of which exists, and claimed no linter is wired. Fixed all three, plus the stale 42-test count. - README's Node 20+ table row contradicted every engines field and its own quick start. Its Testing section omitted the server and client suites. - The client suite ran nowhere in CI. It now rides along in client-build. - The sqlite server-test leg is waived for a failure that no longer reproduces; noted in the job, left advisory pending runner confirmation. Verified: lint clean, SPA builds, 127 server + 10 client + parser + runtime suites pass, and both compose files plus .gitlab-ci.yml still parse as YAML. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
21 lines
812 B
JavaScript
21 lines
812 B
JavaScript
/**
|
|
* Top-level entry point. The Docker image runs `node server.js` from /app.
|
|
*
|
|
* The server code expects to run from the `server/` directory (so relative
|
|
* paths like `./data/observatory.db` resolve), so we chdir before starting
|
|
* the app. We keep this file free of top-level `await` and load the app via
|
|
* dynamic import(). That keeps the async graph (the TLA in
|
|
* src/config/database.js) self-contained, so the file stays safe to require()
|
|
* from a CommonJS host without ERR_REQUIRE_ASYNC_MODULE.
|
|
*/
|
|
import { fileURLToPath } from 'url';
|
|
import { dirname, resolve } from 'path';
|
|
|
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
process.chdir(resolve(here, 'server'));
|
|
|
|
import('./server/src/index.js').catch(err => {
|
|
console.error('[caelum] fatal startup error:', err);
|
|
process.exit(1);
|
|
});
|