Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Open [http://localhost:3000](http://localhost:3000) in your browser.
For the recommended custom server with WebSocket support and `/metrics`, run:

```bash
npm run dev:ws
npm run dev:decoupled
```

`dev:ws` starts the decoupled microservices web server. Start the indexer in a
Expand Down Expand Up @@ -130,7 +130,7 @@ npm run format # Format code with Prettier

## Telemetry

The custom server exposes Prometheus metrics on `http://localhost:3000/metrics` when running `npm run dev:ws`.
The custom server exposes Prometheus metrics on `http://localhost:3000/metrics` when running `npm run dev:decoupled`.

You can configure OpenTelemetry to export spans to Jaeger by setting:

Expand Down
6 changes: 6 additions & 0 deletions server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
* Run with: npx ts-node --project tsconfig.server.json server.ts --legacy
* (or via the `dev:ws:legacy` npm script)
*/

// Visible runtime deprecation warning for developers running the legacy server.
// This should make it obvious when someone accidentally starts the deprecated
// monolithic server. The process continues to run for compatibility, but the
// warning recommends the decoupled microservices path.
console.warn("\n\u001b[33mDEPRECATION: \`server.ts\` is a legacy monolithic server with a known CPU-starvation flaw.\nRecommended: use the microservices/decoupled path (npm run dev:decoupled).\nTo run the legacy server anyway, use the explicit script: npm run dev:legacy\u001b[0m\n");
import { createServer, IncomingMessage } from "http";
import { parse } from "url";
import next from "next";
Expand Down
Loading