1
0
Fork 0
mirror of synced 2024-07-09 00:06:05 +12:00

Fixing sentry init.

This commit is contained in:
Michael Drury 2022-11-29 15:38:25 +00:00
parent a03a970754
commit f65a6171d8

View file

@ -21,7 +21,7 @@ import koaBody from "koa-body"
import http from "http"
import api from "./api"
import * as redis from "./utilities/redis"
import Sentry from "@sentry/node"
const Sentry = require("@sentry/node")
const koaSession = require("koa-session")
const logger = require("koa-pino-logger")
const destroyable = require("server-destroy")
@ -46,7 +46,7 @@ app.use(auth.passport.session())
app.use(api.routes())
// sentry
if (env.isProd()) {
//if (env.isProd()) {
Sentry.init()
app.on("error", (err, ctx) => {
@ -57,7 +57,7 @@ if (env.isProd()) {
Sentry.captureException(err)
})
})
}
//}
const server = http.createServer(app.callback())
destroyable(server)