Files
Tom Moor b189c308e5 perf: Avoid loading unused services (#12537)
* fix: Run single process when only the worker service is enabled

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* perf: Improve memory consumption through lazy service loading

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 16:48:31 -04:00

17 lines
552 B
TypeScript

/**
* Services are lazily imported so that only the modules for the services
* actually being run are loaded into memory. For example, a worker-only
* process does not need to import the web or collaboration services and their
* (often heavy) dependency trees.
*/
const services = {
websockets: () => import("./websockets"),
collaboration: () => import("./collaboration"),
admin: () => import("./admin"),
web: () => import("./web"),
worker: () => import("./worker"),
cron: () => import("./cron"),
} as const;
export default services;