Works on sentry config

parent 7972d7ba
......@@ -44,7 +44,6 @@ build:
script:
- npm install
- export NODE_ENV='production'
- export SENTRY_DSN='https://c8d694a532814105b667236ffb2181e4@sentry.io/1833051'
- export ARSNOVA_CLICK_BACKEND_PORT_INTERNAL='3000'
- export ARSNOVA_CLICK_BACKEND_ROUTE_PREFIX='/backend'
- export LEADERBOARD_ALGORITHM='PointBased'
......
import { Handlers } from '@sentry/node';
import * as bodyParser from 'body-parser';
import * as compress from 'compression';
import * as cors from 'cors';
......@@ -20,7 +21,6 @@ import { LobbyRouter } from './routers/rest/LobbyRouter';
import { MemberRouter } from './routers/rest/MemberRouter';
import { NicksRouter } from './routers/rest/NicksRouter';
import { QuizRouter } from './routers/rest/QuizRouter';
import { dynamicStatistics, staticStatistics } from './statistics';
declare var global: any;
......@@ -55,10 +55,12 @@ class App {
// Run configuration methods on the Express instance.
constructor() {
this._express = express();
this._express.use(Handlers.requestHandler());
this.middleware();
this.routes();
this._express.use(Handlers.errorHandler());
useExpressServer(this._express, routingControllerOptions);
}
......
declare function require(name: string): any;
import { init as sentryInit } from '@sentry/node';
import * as http from 'http';
import { Server } from 'http';
import * as Minimist from 'minimist';
......@@ -45,8 +46,7 @@ interface IInetAddress {
}
if (process.env.NODE_ENV === 'production') {
const Sentry = require('@sentry/node');
Sentry.init({ dsn: process.env.SENTRY_DSN });
sentryInit({ dsn: process.env.SENTRY_DSN });
}
(<IGlobal>global).DAO = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment