Add Sentry dependency

dev
KaKi87 2022-12-24 19:08:25 +01:00
parent 2053ea8fc6
commit 1e284464a7
2 changed files with 19 additions and 0 deletions

View File

@ -1,4 +1,9 @@
export default {
/**
* Sentry DSN
* @type {string}
*/
sentryDsn: undefined,
/**
* Server listening port
* @type {number}

14
mod.js
View File

@ -1,3 +1,4 @@
import * as Sentry from 'npm:@sentry/node';
import pogo from 'https://deno.land/x/pogo@v0.5.2/main.ts';
import { stringSpliceMulti } from 'https://git.kaki87.net/KaKi87/strsplice/raw/commit/5e45f90aab225f2d0023716afd1f91ae133594f9/mod.js';
import { hashSync as hash, compareSync as verify } from 'https://deno.land/x/bcrypt@v0.3.0/mod.ts';
@ -14,11 +15,24 @@ import settings from './lib/settings.js';
import config from './config.js';
const {
sentryDsn,
port,
webUrl,
webhookTimeout
} = config;
Sentry.init({
dsn: sentryDsn,
integrations: [
new Sentry.Integrations.Context({
app: true,
os: true,
device: false,
culture: true
})
]
});
const
server = pogo.server({ port }),
{