Treblle / treblle-node

The official Treblle SDK for NodeJS/ExpressJS/NestJS. Seamlessly integrate Treblle to manage communication with your dashboard, send errors, and secure sensitive data.
https://www.treblle.com/
MIT License
36 stars 4 forks source link

integration with next js api routes #15

Closed olavoparno closed 7 months ago

olavoparno commented 1 year ago

Hey there, is there anyway of implementing useTreblle for nextjs api routes? It's quite coupled to be used with express but is there a way to make it in middleware's fashion of some sorts?

Thank you for the amazing library

DominusKelvin commented 1 year ago

Hey @olavoparno. I'm currently working on breaking the node package into focused packages for their respective frameworks like Express, Koa, Fastify, etc.

This will be a good package you've requested and I can work on it shortly if I understand that Next.js can have middleware that can be installed via NPM, is this doable?

DominusKelvin commented 1 year ago

Also, you can come hang out on Discord where we can discuss the feasibility of this SDK for Next.js

https://treblle.com/chat

olavoparno commented 1 year ago

Hey there, thanks for the prompt response! You see, here are some links that may help clarify this:

https://nextjs.org/docs/advanced-features/middleware - this one for the newest version of Next.js but this I don't think would be best for a possible integration, though.

https://github.com/hoangvvo/next-connect#nextjs-api-routes - this is another library which serves to build api routes in next in an express fashion. This may help building a possible integration.

I can't join discord right now but thanks for the invitation

DominusKelvin commented 1 year ago

Got it. I will take a look and ping you here once I see a workable solution to move forward

nikme commented 7 months ago

Closed as stale, we have in roadmap NextJS SDK, planned in q3 2024.