listen-fix
This commit is contained in:
parent
723796f3a4
commit
e848f40a6b
|
@ -2,8 +2,8 @@ import { Authorizer } from "@authorizerdev/authorizer-js";
|
|||
import { Server } from "@hocuspocus/server";
|
||||
import Sentry from "@sentry/node";
|
||||
|
||||
const s = Sentry.init({ dsn: process.env.GLITCHTIP_DSN });
|
||||
console.debug(s);
|
||||
Sentry.init({ dsn: process.env.GLITCHTIP_DSN });
|
||||
console.info("sentry initialized");
|
||||
|
||||
const port = process.env.PORT || 4000;
|
||||
const authorizer = new Authorizer({
|
||||
|
@ -11,7 +11,8 @@ const authorizer = new Authorizer({
|
|||
authorizerURL: process.env.AUTHORIZER_URL || "https://auth.discours.io",
|
||||
redirectURL: process.env.REDIRECT_URL || "https://testing.discours.io",
|
||||
});
|
||||
console.debug(authorizer);
|
||||
console.info("authorizer initialized");
|
||||
console.debug(authorizer.config.extraHeaders);
|
||||
|
||||
const startServer = async () => {
|
||||
console.info("Starting server...");
|
||||
|
@ -124,6 +125,7 @@ const startServer = async () => {
|
|||
});
|
||||
},
|
||||
});
|
||||
server.listen();
|
||||
};
|
||||
|
||||
process.on("unhandledRejection", (reason, promise) => {
|
||||
|
@ -133,4 +135,5 @@ process.on("unhandledRejection", (reason, promise) => {
|
|||
process.on("uncaughtException", (error) => {
|
||||
Sentry.captureException(error);
|
||||
});
|
||||
|
||||
startServer();
|
||||
|
|
Loading…
Reference in New Issue
Block a user