ToolJet/server/src/events/events.module.ts
Gandharv 1716213247
Chore: add option to enable/disable multiplayer feature (#2984)
* chore: add env to enable/disable multiplayer feature

* fix merge conflict

* rename env

* add default true

* add null check on ymap
2022-05-06 12:29:50 +05:30

20 lines
485 B
TypeScript

import { Module } from '@nestjs/common';
import { EventsGateway } from './events.gateway';
import { YjsGateway } from './yjs.gateway';
import { AuthModule } from 'src/modules/auth/auth.module';
const providers = [];
if (process.env.COMMENT_FEATURE_ENABLE !== 'false') {
providers.unshift(EventsGateway);
}
if (process.env.ENABLE_MULTIPLAYER_EDITING !== 'false') {
providers.unshift(YjsGateway);
}
@Module({
imports: [AuthModule],
providers,
})
export class EventsModule {}