Remove sentry
This commit is contained in:
parent
de18c52eef
commit
7e9dfd3292
|
@ -26,7 +26,6 @@
|
|||
"os-tmpdir": "^1.0.2",
|
||||
"pretty-bytes": "^3",
|
||||
"prop-types": "^15.5.8",
|
||||
"raven": "^1.2.1",
|
||||
"react": "^15.5.4",
|
||||
"react-dom": "^15.5.4",
|
||||
"react-motion": "^0.4.7",
|
||||
|
|
|
@ -36,24 +36,11 @@ const errorHandler = (err, req, res, next) => {
|
|||
next(err)
|
||||
}
|
||||
|
||||
const raven = require('raven')
|
||||
|
||||
if (process.env.SENTRY_DSN)
|
||||
raven.config(process.env.SENTRY_DSN, {
|
||||
environment: process.env.NODE_ENV || 'development',
|
||||
autoBreadcrumbs: true
|
||||
}).install()
|
||||
|
||||
morgan.token('fwd', (req) => req.get('x-forwarded-for').replace(/\s/g, ''))
|
||||
|
||||
const createServer = (config) => {
|
||||
const app = express()
|
||||
|
||||
if (process.env.SENTRY_DSN) {
|
||||
app.use(raven.requestHandler())
|
||||
app.use(raven.errorHandler())
|
||||
}
|
||||
|
||||
app.disable('x-powered-by')
|
||||
|
||||
app.use(morgan(process.env.NODE_ENV === 'production'
|
||||
|
|
Loading…
Reference in New Issue