Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into daisyui2shadcnui
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Feb 7, 2024
2 parents 1a9cb05 + fbf200a commit a7c18b1
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ SESSION_SECRET=<please replace with a better secret>
# For social login see docs/auth.md
# See docs/rewriter.md how to configure the workflow rewriting
HADDOCK3_NCORES = 6
# Error tracking, See https://glitchtip.com/ or https://sentry.io/ for more information
SENTRY_DSN=<YOUR-SENTYRY-DSN-HERE>
5 changes: 4 additions & 1 deletion app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { createReadableStreamFromReadable } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
import { isbot } from "isbot";
import { renderToPipeableStream } from "react-dom/server";
import { init as SentryInit, captureException } from "@sentry/node";

const ABORT_DELAY = 5_000;

Expand Down Expand Up @@ -144,11 +145,13 @@ function handleBrowserRequest(
});
}

SentryInit({ dsn: process.env.SENTRY_DSN });

export function handleError(
error: unknown,
{ request }: LoaderFunctionArgs | ActionFunctionArgs
) {
if (!request.signal.aborted) {
// TODO send error to reporting service
captureException(error);
}
}
2 changes: 1 addition & 1 deletion app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function BoundaryShell({
return (
<html lang="en" data-theme="bonvinlab">
<head>
<title>Haddock3 - {title}</title>
<title>{`Haddock3 - ${title}`}</title>
<Meta />
<Links />
</head>
Expand Down
59 changes: 59 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@remix-run/node": "^2.5.1",
"@remix-run/react": "^2.5.1",
"@remix-run/serve": "^2.5.1",
"@sentry/node": "^7.99.0",
"bcryptjs": "^2.4.3",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
Expand Down

0 comments on commit a7c18b1

Please sign in to comment.