-
Couldn't load subscription status.
- Fork 92
Next13 edge api route and environment variable question #2202
Unanswered
weidezhang
asked this question in
Q&A
-
Hi Community,
I have two questions about edge function in netlify. Any help is greatly appreciated.
-
when deploying nextjs 13 project on netilfy, will API routes using edge runtime becomes edge functions in netlify as well ?
-
how to access environmental variables if treated as edge function. will process.env still work or I have to use the netlify.env global variable. Is there any good example showing how ? Thank you ,
The below is one example i’m trying to use but failed under "netlify dev" testing .
export const config = {
runtime: 'experimental-edge'
};
export default () =>
new Response(JSON.stringify(Netlify.env.toObject(), null, 2));
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment