mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-25 22:27:32 +00:00
724c88c201
A mechanical prettier --write over server/src, server/tests, server/scripts and shared/src with the workspaces' .prettierrc; nothing but layout and import order changes, and every file keeps the same set of imports. shared is formatted throughout and its format baseline is empty. The server baseline keeps the 35 files that Prettier would grow past their lint:size limit (they need a split first, which is not a formatting change), and the generated entity files stay as their generator writes them.
21 lines
740 B
TypeScript
21 lines
740 B
TypeScript
import { RealtimeService } from './realtime.service';
|
|
import { Global, Module } from '@nestjs/common';
|
|
|
|
/**
|
|
* Global so every migrated module can inject RealtimeService without
|
|
* re-importing (same rationale as DatabaseModule). The service stays
|
|
* stateless and dependency-free so the no-Nest test harnesses can build it
|
|
* with a bare `new`.
|
|
*
|
|
* The transport itself lives in RealtimeGatewayModule, which AppModule imports
|
|
* directly. It cannot live here: this module is @Global, so a gateway would
|
|
* follow into every hand-assembled TestingModule and make Nest look for a
|
|
* websocket adapter none of them set.
|
|
*/
|
|
@Global()
|
|
@Module({
|
|
providers: [RealtimeService],
|
|
exports: [RealtimeService],
|
|
})
|
|
export class RealtimeModule {}
|