How can I deploy NextJS website using APIs

I was using APIs to create site and publishing static react websites using the upload zip API.

curl -H "Content-Type: application/zip" \
     -H "Authorization: Bearer YOUR_OAUTH2_ACCESS_TOKEN" \
     --data-binary "" \

Now I have moved to SSR, so need access to edge, how should I deploy it using the same method?
I am using NextJS.

You’d have to build the website with Netlify CLI, so Netlify Runtime can run and configure the site as we need it to be configured and then you can deploy the generated .next folder and the modified netlify.toml.

1 Like

Hi, I tried running netlify build and netlify deploy. It created some assets and 3 edge functions.
But the edge functions are not working. I deployed default CRA of nextjs


Edge APIs

You need to run netlify deploy --build.