@drcode.ai/drcode-node
v1.1.2
Published
A wrapper for Sentry that simplifies DSN configuration and error handling.
Downloads
29
Readme
const config = { publicKey: 'yourPublicKey', projectId: 'yourProjectId', tracesSampleRate: 1.0, // optional profilesSampleRate: 1.0 // optional };
// Initialize drcode-wrapper initDrcode(config);
// Express.js example for setting up error handler const app = express();
app.use(setUpErrorHandler);
app.listen(3000, () => { console.log('Server is running on port 3000'); });
publicKey: string; projectId: string; tracesSampleRate?: number; profilesSampleRate?: number; }
export function initDrcode(config: DrCodeConfig): void;
export function setUpErrorHandler( err: Error, req: any, res: any, next: any ): void;