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