-
-
Save VirtualPirate/1812933d012fa6899ebd486f35fc6c5d to your computer and use it in GitHub Desktop.
Node app deploy with nginx & SSL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BullMQAdapter } from "@bull-board/api/bullMQAdapter"; | |
import { ExpressAdapter } from "@bull-board/express"; | |
import { BullBoardModule } from "@bull-board/nestjs"; | |
import { BullModule } from "@nestjs/bullmq"; | |
import { Module } from "@nestjs/common"; | |
import { ConfigModule, ConfigService } from "@nestjs/config"; | |
import { FinlensQueue, FinlensRedisDb, Validator } from "@authlayer/core"; | |
import { envSchema } from "../helpers/env-schema"; | |
const imports = [ | |
BullModule.forRootAsync({ | |
imports: [ConfigModule], | |
inject: [ConfigService], | |
useFactory: async (configService: ConfigService) => { | |
const host = configService.getOrThrow("REDIS_HOST"); | |
const password = configService.get("REDIS_PASSWORD"); | |
const port = configService.getOrThrow("REDIS_PORT"); | |
const db = FinlensRedisDb.BULLMQ + configService.getOrThrow("REDIS_DB_INDEX"); | |
return { | |
connection: { | |
host, | |
port, | |
password, | |
db, | |
}, | |
}; | |
}, | |
}), | |
BullModule.registerQueue({ | |
name: FinlensQueue.TransactionsSyncQueue, | |
}), | |
BullModule.registerQueue({ | |
name: FinlensQueue.PlaidWebhookQueue, | |
}), | |
ConfigModule.forRoot({ | |
isGlobal: true, | |
validate: Validator(envSchema), | |
}), | |
// MessegeBrokerModule, | |
BullBoardModule.forRoot({ | |
route: "/queues", | |
adapter: ExpressAdapter, | |
}), | |
BullBoardModule.forFeature( | |
{ | |
name: FinlensQueue.TransactionsSyncQueue, | |
adapter: BullMQAdapter, | |
}, | |
{ name: FinlensQueue.PlaidWebhookQueue, adapter: BullMQAdapter }, | |
), | |
]; | |
@Module({ | |
imports, | |
}) | |
export class BullBoardUIModule {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment