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

Nextjs /pages/api doesn't work #4

Open
YuriGor opened this issue Jul 24, 2022 · 1 comment
Open

Nextjs /pages/api doesn't work #4

YuriGor opened this issue Jul 24, 2022 · 1 comment

Comments

@YuriGor
Copy link

YuriGor commented Jul 24, 2022

Hi, I am trying to adopt this example in my nextjs project and once I am adding /api to the root of project - it works,
but /pages/api stops working.
Moving all the /pages/api to /api is not an option - it doesn't work properly (nextjs api work differently then vercel api)
Should we instead move rust api to /pages/api?
Could you provide working example?

I expect this potential issues:

  • package.json / vercel-build may be ignored under /pages so we will need to use package.json from the root of project
  • wasm/.so files will not be deployed by default, this in theory is possible through nextjs config / webpack options.
@YuriGor
Copy link
Author

YuriGor commented Jul 24, 2022

BTW similar issue I faced when tried to use rust runtime in NextJS app.
But that case is even worse, because vercel.json/functions/runtime config will not work under /pages/api so moving api under /pages is not an option also.

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

1 participant