9d30ef15e1
## Documentation / Examples - [ X ] Make sure the linting passes by running `pnpm lint` - [ X ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples) This PR adds an example for using next.js with axiom. Co-authored-by: Balázs Orbán <info@balazsorban.com> Co-authored-by: Steven Tey <stevensteel97@gmail.com>
9 lines
239 B
TypeScript
9 lines
239 B
TypeScript
import { NextResponse } from 'next/server'
|
|
import { log, withAxiom } from 'next-axiom'
|
|
|
|
async function middleware() {
|
|
log.info('Hello from middleware', { bar: 'baz' })
|
|
return NextResponse.next()
|
|
}
|
|
|
|
export default withAxiom(middleware)
|