UNPKG
@logtail/next
Version:
latest (0.2.1)
0.2.1
0.2.0
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.1.0-rc2
0.1.0-rc1
Better Stack Telemetry Next.js client
github.com/logtail/logtail-nextjs
logtail/logtail-nextjs
@logtail/next
/
examples
/
logger
/
app
/
api
/
redirect
/
route.ts
10 lines
(7 loc)
•
285 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{
BetterStackRequest
, withBetterStack }
from
'@logtail/next'
;
import
{ redirect }
from
'next/navigation'
;
export
const
runtime =
'nodejs'
;
// test handling NEXT_REDIRECT error
export
const
GET
=
withBetterStack
(
async
(
req
:
BetterStackRequest
) => {
return
redirect
(
'/'
); });