Star us on GitHub
Star
Menu

Nest.js

Learn how to set up highlight.io log ingestion in Nest.js.
1
Set up your frontend highlight.io integration.

First, make sure you've followed the frontend getting started guide.

2
Add the @highlight-run/nest app middleware.

Use the HighlightLogger middleware to record backend logs in highlight.io

import { HttpAdapterHost, NestFactory } from '@nestjs/core' import { AppModule } from './app.module' import { HighlightLogger } from '@highlight-run/nest' async function bootstrap() { const app = await NestFactory.create(AppModule) const highlightOpts = { projectID: 'YOUR_PROJECT_ID' } app.useLogger(new HighlightLogger(highlightOpts)) await app.listen(3000) } bootstrap()
Copy
3
Verify your backend logs are being recorded.

Visit the highlight logs portal and check that backend logs are coming in.