
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
nestjs-bugsnag
Advanced tools
A progressive Node.js framework for building efficient and scalable server-side applications.
$ npm install --save nestjs-bugsnag @bugsnag/js
In the root of your project:
import { BugsnagModule } from 'nestjs-bugsnag';
import BugsnagPluginExpress from '@bugsnag/plugin-express'
@Module({
imports: [
BugsnagModule.forRoot({
apiKey: '<your-api-key>',
releaseStage: 'production',
appVersion: '1.0.0',
plugins: [BugsnagPluginExpress],
notifyReleaseStages: ['production'],
onUncaughtException: true,
onUnhandledRejection: true,
}),
],
})
export class AppModule {
}
You can add the BugsnagPluginExpress
to your plugins
array in the forRoot
method.
You can also use the forRootAsync
method to configure the module:
import { Module } from '@nestjs/common';
import { BugsnagModule } from 'nestjs-bugsnag';
import { ConfigModule } from '@nestjs/config';
@Module({
imports: [
ConfigModule.forRoot({
...
}),
BugsnagModule.forRootAsync({
inject: [ConfigService],
imports: [ConfigModule],
useFactory: (configService: ConfigService) => ({
apiKey: configService.get('BUGSNAG_API_KEY'),
releaseStage: configService.get('BUGSNAG_RELEASE_STAGE'),
appVersion: configService.get('BUGSNAG_APP_VERSION'),
notifyReleaseStages: configService.get('BUGSNAG_NOTIFY_RELEASE_STAGES'),
onUncaughtException: configService.get('BUGSNAG_ON_UNCAUGHT_EXCEPTION'),
onUnhandledRejection: configService.get('BUGSNAG_ON_UNHANDLED_REJECTION'),
}),
}),
],
})
More options are found in Bugsnag docs
You can inject the BugsnagService
to use it in your application:
import { BugsnagService } from 'nestjs-bugsnag';
@Controller()
export class AppController {
constructor(private readonly bugsnagService: BugsnagService) {
}
failingMethod() {
this.bugsnagService.notify(new Error('Something went wrong'));
}
}
FAQs
A bugsnag library wrapper for nestjs
The npm package nestjs-bugsnag receives a total of 494 weekly downloads. As such, nestjs-bugsnag popularity was classified as not popular.
We found that nestjs-bugsnag demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.