Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Next.js App Router Support and Example Usage #657

Closed
2 tasks done
CarlosZiegler opened this issue Sep 23, 2024 · 3 comments
Closed
2 tasks done

Request for Next.js App Router Support and Example Usage #657

CarlosZiegler opened this issue Sep 23, 2024 · 3 comments

Comments

@CarlosZiegler
Copy link

Initial checklist

  • I understand this is a feature request and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Problem

Hi TUS team,

I’m currently integrating TUS into a project that uses the Next.js App Router (with /app directory structure). However, I’ve noticed that the examples and documentation primarily focus on the older Next.js page-based router.

Could you confirm whether there’s official support for the Next.js App Router? If so, I’d appreciate any examples or best practices that could help in implementing bus with this new router structure. If this feature is not yet supported, do you have any insights on when it might be available?

Thanks in advance!

Solution

This will be works on APP router like pages/api

Alternatives

I dont know :)

@Murderlon
Copy link
Member

Tus is just a barebones Node.js HTTP handler so it can be integrated everywhere and into everything. It shouldn't be too hard to add it to the app router, you probably have to export the same handler a couple times as you know have to export per HTTP method.

I will take a look at it but if you're already experimenting yourself would be great to update here on your progress.

@Murderlon
Copy link
Member

Turns out this is not possible right now without some significant work on @tus/server, which is the same work that would need to happen for #461

@Murderlon
Copy link
Member

Closing as duplicate of #461

@Murderlon Murderlon closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants