|
|
@ -121,7 +121,7 @@ export default class Noco { |
|
|
|
nestApp.use(requestIp.mw()); |
|
|
|
nestApp.use(requestIp.mw()); |
|
|
|
nestApp.use(cookieParser()); |
|
|
|
nestApp.use(cookieParser()); |
|
|
|
|
|
|
|
|
|
|
|
this.initSentry(nestApp); |
|
|
|
// this.initSentry(nestApp);
|
|
|
|
|
|
|
|
|
|
|
|
nestApp.useWebSocketAdapter(new IoAdapter(httpServer)); |
|
|
|
nestApp.useWebSocketAdapter(new IoAdapter(httpServer)); |
|
|
|
|
|
|
|
|
|
|
@ -139,7 +139,7 @@ export default class Noco { |
|
|
|
server.get('/', (_req, res) => res.redirect(dashboardPath)); |
|
|
|
server.get('/', (_req, res) => res.redirect(dashboardPath)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.initSentryErrorHandler(server); |
|
|
|
// this.initSentryErrorHandler(server);
|
|
|
|
|
|
|
|
|
|
|
|
return nestApp.getHttpAdapter().getInstance(); |
|
|
|
return nestApp.getHttpAdapter().getInstance(); |
|
|
|
} |
|
|
|
} |
|
|
@ -189,19 +189,19 @@ export default class Noco { |
|
|
|
} |
|
|
|
} |
|
|
|
process.env.NC_SERVER_UUID = serverId; |
|
|
|
process.env.NC_SERVER_UUID = serverId; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//
|
|
|
|
private static initSentryErrorHandler(router) { |
|
|
|
// private static initSentryErrorHandler(router) {
|
|
|
|
if (process.env.NC_SENTRY_DSN) { |
|
|
|
// if (process.env.NC_SENTRY_DSN) {
|
|
|
|
router.use(Sentry.Handlers.errorHandler()); |
|
|
|
// router.use(Sentry.Handlers.errorHandler());
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
private static initSentry(router) { |
|
|
|
// private static initSentry(router) {
|
|
|
|
if (process.env.NC_SENTRY_DSN) { |
|
|
|
// if (process.env.NC_SENTRY_DSN) {
|
|
|
|
Sentry.init({ dsn: process.env.NC_SENTRY_DSN }); |
|
|
|
// Sentry.init({ dsn: process.env.NC_SENTRY_DSN });
|
|
|
|
|
|
|
|
//
|
|
|
|
// The request handler must be the first middleware on the app
|
|
|
|
// // The request handler must be the first middleware on the app
|
|
|
|
router.use(Sentry.Handlers.requestHandler()); |
|
|
|
// router.use(Sentry.Handlers.requestHandler());
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|