Skip to content

Commit

Permalink
raven support added
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan787 committed May 18, 2019
1 parent 02977aa commit 49c186e
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 149 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"minio": "^7.0.3",
"pg": "^7.4.3",
"pg-hstore": "^2.3.2",
"raven": "^2.6.4",
"sequelize": "^4.22.6",
"uuid": "^3.3.2"
},
Expand Down
8 changes: 7 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import express = require('express')
import dbg = require('debug')
import path = require ('path')
import Raven = require('raven')
import apiRoute from './routes/api'

const DSN = process.env.DSN
const debug = dbg('server:main')

const app = express()

Raven.config(DSN).install()
app.use(Raven.requestHandler())
app.use(Raven.errorHandler())

app.use(express.json())
app.use(express.urlencoded({extended: true}))
app.use('/docs', express.static(path.join(__dirname, '../docs')))
Expand Down
1 change: 1 addition & 0 deletions test.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ DB_HOST=postgres
DB_NAME=judgeapi-dev
DB_USER=judgeapi
DB_PASS=judgeapi
DSN=randomDSNString
JUDGEAPI_HOST=localhost
JUDGEAPI_PORT=3737
DEBUG=test:*
Loading

0 comments on commit 49c186e

Please sign in to comment.