-
First I cloned the project and then modified the code ///src\main.ts
// const redisIoAdapter = new SocketIOAdapter(app, configService);
// await redisIoAdapter.connectToRedis();
// app.useWebSocketAdapter(redisIoAdapter);
// =========================================================
// configure shutdown hooks
// =========================================================
///src\lib\config\config.module.ts
@Module({
imports: [
ConfigModule.forRoot({
envFilePath: [`${process.cwd()}/env/.env.${process.env.NODE_ENV}`],
load: [
app,
jwt,
database,
// mail,
redis,
// cloudinary,
// rabbitmq,
// throttle,
// googleOauth,
// facebookOauth,
],
cache: true,
isGlobal: true,
expandVariables: true,
validationSchema: Joi.object({
...appConfigValidationSchema,
...jwtConfigValidationSchema,
...databaseConfigValidationSchema,
// ...mailConfigValidationSchema,
...redisConfigValidationSchema,
// ...cloudinaryConfigValidationSchema,
// ...rabbitmqConfigValidationSchema,
// ...throttleConfigValidationSchema,
// ...googleOauthConfigValidationSchema,
// ...facebookOauthConfigValidationSchema,
}),
validationOptions: {
abortEarly: true,
cache: !HelperService.isProd(),
debug: !HelperService.isProd(),
stack: !HelperService.isProd(),
},
}),
],
providers: [ConfigService],
exports: [ConfigService],
})
///src\modules\shared\shared.module.ts
@Module({
imports: [
NestConfigModule,
NestMailModule,
NestPinoModule,
NestI18nModule,
NestCloudinaryModule,
NestCacheModule,
NestCaslModule,
NestThrottlerModule,
NestHttpModule,
NestJwtModule,
ScheduleModule.forRoot(),
],
providers: [
{
provide: APP_GUARD,
useClass: CustomThrottlerGuard,
},
{
provide: APP_INTERCEPTOR,
useClass: HttpCacheInterceptor,
},
{
provide: APP_INTERCEPTOR,
useClass: ClearCacheInterceptor,
},
],
})
export class SharedModule {} At the moment the project is running, but there is only one ping route and the others are not mapped, I don't know how to solve it |
Beta Was this translation helpful? Give feedback.
Answered by
rubiin
Sep 24, 2024
Replies: 2 comments 2 replies
-
A new PR is on the way . With some fixes both coding styles and improved documentation. I hope to get that done by this weekend. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
rubiin
-
Try the latest |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A new PR is on the way . With some fixes both coding styles and improved documentation. I hope to get that done by this weekend.
You can check the mikro-fix branch in the mean time