Cloudflare Pages Tutorial - Deploy a Static Next.js Web Apps

Ғылым және технология

Learn how to use Cloudflare Pages to host and deploy static Next.js web apps. In this tutorial, we'll walk through:
00:00 - Intro
00:09 - What tools will we use?
00:39 - Using Create Next App to create a new Next.js app
01:14 - Creating a new GitHub repository
02:34 - Connecting a GitHub repository to Cloudflare Pages
03:52 - Deploying a Next.js app to Cloudflare Pages
07:39 - Cloudflare Deploy Previews with GitHub Pull Requests
09:24 - Outro
🗒️ Read More
spacejelly.dev/posts/how-to-u...
🔔 Subscribe for more tech and developer videos
kzread.info?s...
🐦 Get updates straight to your Twitter @colbyfayock
/ colbyfayock
📸 Catch the next stream live on Twitch @colbyfayock
/ colbyfayock
✉️ Or a newsletter right to your inbox!
www.colbyfayock.com/newsletter/
💝 Sponsor me for more free content like this!
github.com/sponsors/colbyfayock
👨‍🚀 Brought to by colbyfayock.com
www.colbyfayock.com
🎥 Want to know what A/V equipment I use?
www.colbyfayock.com/what-i-use
🧰 More Resources
Cloudflare Pages
pages.cloudflare.com/
Create Next App
nextjs.org/docs/api-reference...
Adding an existing project to GitHub using the command line - GitHub
docs.github.com/en/github/imp...
🎼 Music
Music from Uppbeat (free for Creators!):
uppbeat.io/t/danijel-zambo/im...
License code: PMHWXFPDZ0IOVNL0
#colbyfayock #cloudflare #nextjs #jamstack #deployment #webdevelopment

Пікірлер: 34

  • @colbyfayock
    @colbyfayock11 ай бұрын

    Get fresh tutorials and other free content straight to your inbox! colbyfayock.com/news

  • @JamesQQuick
    @JamesQQuick3 жыл бұрын

    Amazing stuff!! I'm going to go a cloudflare pages video soon!

  • @colbyfayock

    @colbyfayock

    3 жыл бұрын

    thanks James! it's an awesome solution, glad to see Cloudflare put something out

  • @colbyfayock
    @colbyfayock3 жыл бұрын

    Next, learn how to fetch data in a Next.js app! kzread.info/dash/bejne/m4tnm6-eot2Wqqg.html Make sure to subscribe for more: kzread.info

  • @marianaarmasdevillanueva4131

    @marianaarmasdevillanueva4131

    3 жыл бұрын

    hey man and had a problem with ark you may be able to help me problem during the impossible connection make cloudflare authentication request might be having errors please check later

  • @colbyfayock

    @colbyfayock

    3 жыл бұрын

    @@marianaarmasdevillanueva4131 hey Thiago, not totally following your question, could you explain a little more?

  • @KaiBuskirk
    @KaiBuskirk Жыл бұрын

    New sub… would love to do this… Is was just fast and missing deeper steps I still appreciate it.. Love to see more slower step by step… thank you !

  • @colbyfayock

    @colbyfayock

    Жыл бұрын

    thanks for the feedback! in the meantime you could try using KZread's controls to slow the video

  • @huuphongcom
    @huuphongcom3 жыл бұрын

    Slowest video of yours I think. Really nice, thank you :D

  • @colbyfayock

    @colbyfayock

    3 жыл бұрын

    ive been working on it! :) thanks

  • @Mostafaabobakr7
    @Mostafaabobakr72 жыл бұрын

    Thank you

  • @colbyfayock

    @colbyfayock

    2 жыл бұрын

    You got it!

  • @DouglasNeves
    @DouglasNeves3 жыл бұрын

    Amazing! Looks a lot with Vercel. What service do you suggest to attach mongodb and file storage to nextjs running on cloudflare-pages or Vercel?

  • @colbyfayock

    @colbyfayock

    3 жыл бұрын

    yeah! the static hosting services are very similar if you're using Next.js + Vercel, you can leverage serverless functions to interface with mongodb vercel.com/docs/serverless-functions/introduction If you're using Cloudflare, you could check out Cloudflare Workers for serverless functions if you want to stay in the "same family" workers.cloudflare.com/ as far as storage, typically youd be looking at AWS S3 and similar products on Azure and GCP, not sure if there are other storage services that are competing right now

  • @DouglasNeves

    @DouglasNeves

    3 жыл бұрын

    @@colbyfayock Thanks for the response!

  • @sethm8092
    @sethm8092 Жыл бұрын

    Great tutorials -- how does Next.js 13 change this? Would love to see a deployment using that!

  • @colbyfayock

    @colbyfayock

    Жыл бұрын

    Thanks and good question. So it's been a while since I made this so I'm not totally sure what cloudflare supports. This example though uses static export. I'm unsure if 13 supports that or not, though I'd find it odd if they didn't given server components would fit in well there

  • @sethm8092

    @sethm8092

    Жыл бұрын

    @@colbyfayock I think (and I'm about to dive in and try it so I'll let you know) that Next.js 13 does caching static by default but makes it a lot easier to implement whatever caching strategy you want. But that cache capability (and the new app structure) don't yet work in Cloudflare. But I'll know more in like 1-2 days when I try it in irl. Great content man -- keep it up

  • @huuphongcom
    @huuphongcom3 жыл бұрын

    i18n is not supporting by Cloudflare Pages also.

  • @colbyfayock

    @colbyfayock

    3 жыл бұрын

    could you elaborate? not totally sure what support you're referring to. i would think that would be dependent on what you do with the framework no?

  • @Mr.WhiteBeard
    @Mr.WhiteBeard2 жыл бұрын

    Hi how to build node js + native js without framework on cloudfare pages ? Thanks

  • @colbyfayock

    @colbyfayock

    2 жыл бұрын

    Hey sorry I don't have a great answer for that it's highly dependent on the project

  • @gustavosilva3107
    @gustavosilva3107 Жыл бұрын

    I'm facing the following error: The engine "node" is incompatible with this module. Expected version ">=12.22.0". Got "12.18.0" I don't know how to change the node version :(

  • @colbyfayock

    @colbyfayock

    Жыл бұрын

    have you seen this? developers.cloudflare.com/pages/platform/build-configuration/#language-support-and-tools looks like you can set an environment variable for NODE_VERSION

  • @gustavosilva3107

    @gustavosilva3107

    Жыл бұрын

    @@colbyfayock that worked to me, thank you so much!

  • @asiessingh23
    @asiessingh233 жыл бұрын

    Will Nextjs ISR work in cloudflare pages

  • @colbyfayock

    @colbyfayock

    3 жыл бұрын

    good question, im not aware of support of that right now, i believe it's static only. though you might be able to figure out some kind of solution hacking together something with their Workers solution as well, but haven't dug into anything like that yet

  • @asiessingh23

    @asiessingh23

    3 жыл бұрын

    @@colbyfayock a not so elegant solution could be setting a cron job using workers to check for the changes and somehow make a small change to a file and commit it which would cause it to rebuild. The only problem then would be that it rebuilds the whole project rather than the page with the changed data

  • @henrihelvetica5835
    @henrihelvetica58353 жыл бұрын

    👏🏾

  • @colbyfayock

    @colbyfayock

    3 жыл бұрын

    thanks Henri 💜

  • @Alihussain-rk1ci
    @Alihussain-rk1ci Жыл бұрын

    how will you use ssr ?

  • @colbyfayock

    @colbyfayock

    Жыл бұрын

    in this solution you wouldnt - i havent tried out Pages since this video so not sure if they've changed how they support features like that, but this uses the export functionality which would be a static representation

  • @eleah2665
    @eleah26653 жыл бұрын

    Hello team!

  • @colbyfayock

    @colbyfayock

    3 жыл бұрын

    hey team! 👋

Келесі