DEV Community

Sh Raj
Sh Raj

Posted on • Edited on

Deploy Full Stack NextJS app on Cloudflare Pages πŸ“‘

Add to package.json

"pages:build": "npx @cloudflare/next-on-pages"

Enter fullscreen mode Exit fullscreen mode

Add this code to layout.js

export const runtime = "edge";
Enter fullscreen mode Exit fullscreen mode

Now, You can go to cloudflare dashboard and publish your application from Git Repository.

After deploy add nodejs_compat flag

Go to Settings -> Functions -> Compatibility flags

See Video

Git Repo :-
Website :-


See :- https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-nextjs-site/

Top comments (0)