Deploy Next Js on Cloudflare

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 เม.ย. 2024
  • I really think cloudflare is a really good option for hosting your Next Js application but I think it goes under the radar for a lot of people. Recording this quick video to show people how to deploy your Next Js Application on Cloudflare. Cloudflare's free tier is much more friendly when compared with their competitors such as Vercel, Netlify or AWS. Espacially the unlimited CDN!
    _____________________________________
    Follow my journey on Twitter: / sphorbio
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 72

  • @agy112
    @agy112 หลายเดือนก่อน +6

    Thank you, I really like your content. It would be interesting to benchmark Cloudflare vs Vercel vs VPS hosting

  • @alexanderclay5847
    @alexanderclay5847 2 หลายเดือนก่อน +6

    Love this! Please do more videos on cloud flare, trying to move of vercel due to pricing

    • @sphorb
      @sphorb  2 หลายเดือนก่อน +2

      Will do! That's exactly the reason I started learning about Cloudflare as well

    • @samnmeje3486
      @samnmeje3486 หลายเดือนก่อน

      what else would you like to learn about cloudflare ?

  • @SystemBee
    @SystemBee หลายเดือนก่อน

    It worked perfectly with your help, thank you very much

  • @Deus-lo-Vuilt
    @Deus-lo-Vuilt หลายเดือนก่อน +1

    Love cloudflare and nextjs

  • @codewrangler
    @codewrangler 21 วันที่ผ่านมา +1

    Thanks! Awesome video, I deploy most of my projects on vercel and pair it with cloudflare dns. Looking forward to trying this on my next project. Have you discovered any nextjs features that you lose by deploying to cloudflare?

  • @scotly_emi
    @scotly_emi 2 หลายเดือนก่อน +11

    Can you make an in depth tutorial on this topic because of some other issues like deploying a full stack project and also use next image please

    • @sphorb
      @sphorb  2 หลายเดือนก่อน +8

      Thanks for the feedback! Yeah I'm planning on creating a full video building a project and deploying it on Cloudflare and then more complex projects in the future!

    • @rubinskyzlatrovich6731
      @rubinskyzlatrovich6731 2 หลายเดือนก่อน +1

      Ye how to handle next image on cloudflare

    • @noahperez9631
      @noahperez9631 หลายเดือนก่อน

      @@sphorb witch one it is ? is it on your youtube channel ?

  • @wilbertdune
    @wilbertdune หลายเดือนก่อน

    it would great a side by side comparison, like what works, what doesn't work on nextjs with cloudflare. side by side comparison with Vercel.

  • @AbuAbdullah_IN
    @AbuAbdullah_IN หลายเดือนก่อน

    This looks awesome. One common concern that I have heard with nextjs devs is the 10s timeout for severless functions. Will we be able to overcome the same when we deploy it on cloud flare? If yes, can u plz let us know how? Thanks in advance

  • @jhoanmiguelescobararboleda8547
    @jhoanmiguelescobararboleda8547 2 หลายเดือนก่อน +2

    nice video, you got s sub here!!
    Plz make videos about deploys I love this

    • @sphorb
      @sphorb  2 หลายเดือนก่อน

      Thank you so much man! Will do. Will try to cover anything you can't find a video about on TH-cam

  • @JackBrunsion
    @JackBrunsion หลายเดือนก่อน

    does not npx directly run the comman on the fly? why do you need to install the package you are about to run with it as a dev dependency too? regardless good video, keep it up

  • @MuhammadIbrahim-ng8je
    @MuhammadIbrahim-ng8je หลายเดือนก่อน

    Hey man thank you. Can you please implement it using a larger application. I have already deployed it but the results are not good. Some id/slug pages are either crashing or not navigating upon click. Also how to work with next API's.

  • @fitimbytyci345
    @fitimbytyci345 หลายเดือนก่อน

    There must be a catch right? if all NextJS features work as they should.
    Didn’t Lee wrote a post on twitter that they stopped using edge on v0?

  • @raves_r3177
    @raves_r3177 หลายเดือนก่อน

    Subbed! Please do cloudflare deploying full stack next js that uses Image component

    • @sphorb
      @sphorb  หลายเดือนก่อน

      hey thanks!
      I created a mini course showing how you can create a full stack application with this stack! Hope you find it helpful. Let me know about anything more you'd like!
      here's the link: th-cam.com/video/Ouny4LKe3UM/w-d-xo.html

  • @ryankenzo9946
    @ryankenzo9946 หลายเดือนก่อน

    can you make how to enbale or config cloudflare turnstile on next js project & if possible fullstack next js project on cloudflare

  • @csayantan
    @csayantan 28 วันที่ผ่านมา

    can you explain how I can deploy Angular 18 with ssr/ssg configured with xata for data retrival on Cloudflare pages ?

  • @iPuppyTech
    @iPuppyTech 24 วันที่ผ่านมา +1

    Dude does it support ssr?

  • @naylord5
    @naylord5 2 หลายเดือนก่อน

    Looks superb! Thank you so much for sharing master! 🔥
    Could you please consider creating a CRUD with Next 14 and server actions?
    And deploy it to Cloudflare, IDK if is neccesary to use Workers o something else?
    I'm hesitating between having everything in a fullstack mono repo, or creating a backend with Hono.. Hopefully you can bring some light with this..
    Thank you in advance mate!

    • @sphorb
      @sphorb  2 หลายเดือนก่อน +1

      Hey thanks! I can try to make a video on this:) but for your use case you don't need a separate backend at all. Next Js has everything you need to build a simple CRUD app

    • @naylord5
      @naylord5 2 หลายเดือนก่อน

      @@sphorb thank you for the input!
      Looking forward to it

    • @Victor-dd7el
      @Victor-dd7el 2 หลายเดือนก่อน

      @@sphorb cool, I want to know it

    • @sphorb
      @sphorb  หลายเดือนก่อน +1

      hey @naylord5 :) I created a simple CRUD application and hosted it on cloudflare, just as you requested 😁 I hope you find it helpful! here's the link: th-cam.com/video/Ouny4LKe3UM/w-d-xo.html

    • @naylord5
      @naylord5 หลายเดือนก่อน

      @@sphorb superb! I really appreciate your explanation and time mate.
      Definitely will try it tomorrow.
      Thank you so much! 🙌

  • @vogelcodes
    @vogelcodes 2 หลายเดือนก่อน +1

    I'll try that today. I've been using a VPS to host my Next pages (mostly landing pages to sell digital products) and using Cloudflare as DNS/Proxy. Do you know if the Free tier can be used to host commercial sites? Vercel doesn't allow it.

    • @sphorb
      @sphorb  2 หลายเดือนก่อน +1

      Yeah that's another neat thing about Cloudflare. You can use it for your business without any restriction like that!

    • @vogelcodes
      @vogelcodes 2 หลายเดือนก่อน

      5 hours later, I migrated my whole landing page to Cloudflare

    • @sphorb
      @sphorb  2 หลายเดือนก่อน

      Nice! Was there anything weird you encountered? I imagine if everything works properly you want have to pay for VPS anymore😁

    • @vogelcodes
      @vogelcodes 2 หลายเดือนก่อน

      @@sphorb Yeah, there were some issues. Couldnt get tRPC or NextAuth to work. But they weren't needed at all. I used the T3 stack by Theo and both tRPC and NextAuth were included in the boilerplate. I'm still using a VPS to host a backend to save leads to a database and display a dashboard to my clients.

  • @abrahamugbeshe1990
    @abrahamugbeshe1990 2 หลายเดือนก่อน

    Wonderful video mate 👏, I have a video request to share with you. How best can I reach out to you?

    • @sphorb
      @sphorb  2 หลายเดือนก่อน +1

      Thank you man! Sure you can either type it here and I'll add it to my list. Or you can DM me on twitter @sphorbio :) whichever you prefer!

  • @mel-182
    @mel-182 หลายเดือนก่อน

    is this included in free tier?

    • @sphorb
      @sphorb  หลายเดือนก่อน

      Yep, it's included in free tier and the free tier is quite generous from Cloudflare so you don't have to worry

  • @user-ps6tt3kp7l
    @user-ps6tt3kp7l 2 หลายเดือนก่อน

    Thank you so very very much!!!

    • @sphorb
      @sphorb  2 หลายเดือนก่อน

      No worries!

    • @user-ps6tt3kp7l
      @user-ps6tt3kp7l 2 หลายเดือนก่อน +1

      @@sphorb ❤️

  • @claytonbennett7797
    @claytonbennett7797 5 วันที่ผ่านมา

    I'm getting some deprecation warnings, such as:
    npm warn deprecated uuid@3.3.2: Please upgrade to version 7 or higher
    I just did a fresh node install following a fresh fnm install
    Is this a cloudflare problem or a me problem?

  • @harvey_04
    @harvey_04 2 หลายเดือนก่อน +2

    can writing `export const runtime = "edge" ` on the layout page rather than in each page suffice?

    • @sphorb
      @sphorb  2 หลายเดือนก่อน +1

      Sadly not at the moment, you have put it at the top of every page and API route. A better way in the future would be able to define it in your next configuration 😁but not possible atm

    • @harvey_04
      @harvey_04 2 หลายเดือนก่อน +1

      @@sphorb anything for cloudware's bandwidth lol

  • @kapatidkumusta
    @kapatidkumusta 2 หลายเดือนก่อน

    Have you tried making a Nextjs + Drizzle and cloudflare's database? I just wanted to know the setup required to do that.

    • @sphorb
      @sphorb  2 หลายเดือนก่อน +1

      hey hey @kapatidkumusta I haven't actually tried using Cloudflare's D1 database yet. I will explore this in the future. But for now I am really enjoying Turso Database. Their free tier and developer experience is really good with Drizzle

    • @kapatidkumusta
      @kapatidkumusta 2 หลายเดือนก่อน +1

      @sphorb Yeah, Turso is quite good as I have also used it with Nextjs. The problem is I sometimes get these "socket hang up" errors, which the Turso team has already acknowledged as a bug, but they are having a hard time debugging it till this day.

  • @BilalMansouridz
    @BilalMansouridz 2 หลายเดือนก่อน

    Thank you 🙏 Does the Cloudflare hosting setup you demonstrated support app API routes in Next.js , or is it just for static sites?

    • @sphorb
      @sphorb  2 หลายเดือนก่อน +1

      Thank you man! Yes! It works for API routes as well. Just make sure to put export const runtime = "edge" for your API routes as well

  • @neeshsamsi
    @neeshsamsi หลายเดือนก่อน

    Does cloudflare pages support all features of Next? Because I recently ran a project on Netlify to try and move off Vercel and server actions didn't seem to be working

    • @sphorb
      @sphorb  หลายเดือนก่อน

      Ahh that's interesting, I use server actions in almost all my applications and I deploy it on Cloudflare. It all seems to work totally fine.

    • @sphorb
      @sphorb  หลายเดือนก่อน

      My site sphorb.io is on Cloudflare and it uses server actions. Everything works great 😁

    • @neeshsamsi
      @neeshsamsi หลายเดือนก่อน

      @@sphorb Awesome. Definitely going to use this next time

  • @vaisakhkm783
    @vaisakhkm783 หลายเดือนก่อน

    Can we run other meta frameworks like sveltekit, nuxt, analog or like spring, ruby on railson rails etc.c

    • @sphorb
      @sphorb  หลายเดือนก่อน +1

      I'm not sure about ruby and spring but sveltekit and nuxt for sure you can

    • @vaisakhkm783
      @vaisakhkm783 หลายเดือนก่อน

      @@sphorb ho ok thanks

  • @Victor-dd7el
    @Victor-dd7el 2 หลายเดือนก่อน

    Make a video on how to use Image component in cloudflare for free, I mean how to serve the appropiate image

    • @sphorb
      @sphorb  2 หลายเดือนก่อน

      Will do! Something I'm researching at the moment

  • @SonAyoD
    @SonAyoD 2 หลายเดือนก่อน +3

    Is it cheaper?

    • @sphorb
      @sphorb  2 หลายเดือนก่อน +8

      Yep Cloudflare's pricing is much cheaper compared to Vercel, they offer you unlimited CDN for free but Vercel has a limit on that as well even on free tier

  • @mikhacavin
    @mikhacavin 2 หลายเดือนก่อน +2

    cloudflare support SSR and
    RSC ?

    • @sphorb
      @sphorb  2 หลายเดือนก่อน +1

      Yes it does :)

    • @mikhacavin
      @mikhacavin 2 หลายเดือนก่อน +1

      @@sphorb whoaa cloudflare looks OP. they give us unlimited bandwidth 🤯

    • @sphorb
      @sphorb  2 หลายเดือนก่อน +1

      Exactly! It's sad how many people aren't aware of Cloudflare services. I've taken it upon myself to show people 🤣

    • @mikhacavin
      @mikhacavin 2 หลายเดือนก่อน +1

      @@sphorb 😂😂

    • @Victor-dd7el
      @Victor-dd7el 2 หลายเดือนก่อน

      @@sphorb how do they support SSR in next14?

  • @ashish99311
    @ashish99311 24 วันที่ผ่านมา

    this package cloudflare/next-onpages will work with NUXT 3 pages and SSR of NUXT3?

    • @sphorb
      @sphorb  24 วันที่ผ่านมา

      For next the deployment process will be different I believe. They must have how it's done in their documentation