Works on sentry config

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