Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
arsnova-click-v2-backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
ARSnova
arsnova-click-v2-backend
Commits
61e759f5
Commit
61e759f5
authored
Nov 25, 2019
by
Christopher Mark Fullarton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Works on sentry config
parent
47905a41
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
src/App.ts
src/App.ts
+15
-1
src/main.ts
src/main.ts
+0
-10
No files found.
src/App.ts
View file @
61e759f5
import
{
Handlers
}
from
'
@sentry/node
'
;
import
{
Handlers
,
init
as
sentryInit
,
Integrations
}
from
'
@sentry/node
'
;
import
*
as
bodyParser
from
'
body-parser
'
;
import
*
as
compress
from
'
compression
'
;
import
*
as
cors
from
'
cors
'
;
import
*
as
express
from
'
express
'
;
import
{
Request
,
Response
,
Router
}
from
'
express
'
;
import
*
as
logger
from
'
morgan
'
;
import
*
as
process
from
'
process
'
;
import
{
RoutingControllersOptions
,
useExpressServer
}
from
'
routing-controllers
'
;
import
*
as
swaggerUi
from
'
swagger-ui-express
'
;
import
options
from
'
./lib/cors.config
'
;
...
...
@@ -53,6 +54,8 @@ class App {
// Run configuration methods on the Express instance.
constructor
()
{
App
.
initializeSentry
();
this
.
_express
=
express
();
this
.
_express
.
use
(
Handlers
.
requestHandler
());
...
...
@@ -90,6 +93,17 @@ class App {
this
.
_express
.
use
(
`
${
staticStatistics
.
routePrefix
}
/`
,
router
);
}
private
static
initializeSentry
():
void
{
sentryInit
({
dsn
:
process
.
env
.
SENTRY_DSN
,
integrations
:
[
new
Integrations
.
OnUncaughtException
(),
new
Integrations
.
OnUnhandledRejection
(),
],
enabled
:
process
.
env
.
NODE_ENV
===
'
production
'
,
debug
:
true
,
});
}
}
export
default
new
App
().
express
;
src/main.ts
View file @
61e759f5
declare
function
require
(
name
:
string
):
any
;
import
{
init
as
sentryInit
,
Integrations
}
from
'
@sentry/node
'
;
import
*
as
http
from
'
http
'
;
import
{
Server
}
from
'
http
'
;
import
*
as
Minimist
from
'
minimist
'
;
...
...
@@ -38,15 +37,6 @@ interface IInetAddress {
address
:
string
;
}
sentryInit
({
dsn
:
process
.
env
.
SENTRY_DSN
,
integrations
:
[
new
Integrations
.
OnUncaughtException
(),
new
Integrations
.
OnUnhandledRejection
(),
],
enabled
:
process
.
env
.
NODE_ENV
===
'
production
'
,
debug
:
true
,
});
(
<
IGlobal
>
global
).
DAO
=
{
AssetDAO
,
CasDAO
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment