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

Use environment variable to check if next is handling requests #427

Merged
merged 5 commits into from
Oct 24, 2024

Conversation

hansott
Copy link
Collaborator

@hansott hansott commented Oct 23, 2024

In monorepo's with many packages, it could be that next is used in a separate package (e.g. their website)

If we use require.resolve("next") it will return a path and thus start reading bodies

For micro, there's no way to know if it's micro (require("micro") does not happen nor is there an env variable)

For micro, we can add a separate function handler to improve (similar to lambda and google function).

In monorepo's with many packages, it could be that next is used in a
separate package (e.g. their website)

If we use `require.resolve("next")` it will return a path and thus start
reading bodies

For micro, there's no way to know if it's micro (`require("micro")` does not happen nor is there an env variable)

For micro, we can add a separate function handler to improve (similar to
lambda and google function).
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@hansott hansott merged commit a0e3bc1 into beta Oct 24, 2024
9 checks passed
@hansott hansott deleted the use-next-env-var branch October 24, 2024 10:53
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

Successfully merging this pull request may close these issues.

2 participants