Set up Vite local dev with the Netlify CLI
lessonDuration 39s
In this lesson, you'll globally install the Netlify CLI and use its dev command to run your site locally. Netlify automatically detects if it's a Vite project!
Browse
Find courses, lessons, articles, talks, and podcasts.
68 results for "netlify"
Showing 1–24 · Page 1 of 3
lessonDuration 39s
In this lesson, you'll globally install the Netlify CLI and use its dev command to run your site locally. Netlify automatically detects if it's a Vite project!
lessonDuration 2m 9s
Netlify has the power to automatically detect serverless functions in your project and run a functions server with hot reloading for you. In this lesson, you'll learn how to create serverless functions in your Netlify app using TypeScript
lessonDuration 4m 9s
After all your hard work, it's time to deploy your app! In this lesson, you will learn how to get your project onto GitHub and deploy it using Netlify
lessonDuration 1m 30s
We scaffold out a Netlify function in a new directory and access it via curl and the browser.
lessonDuration 58s
Netlify functions are shipped at .netlify/functions/<function-name>. Our users will want a shorter, more memorable URL, so let's give that to them using redirects. This redirect also lets us swap our our function at any time so that users aren't writing the direct path to the function into their production sites.
lessonDuration 7m 32s
Every time we hit our function it runs the headless browser and regenerates the image. We can fix this by using Cloudinary as a write-through cache in front of our Netlify opengraph image generation function. If the image exists, Cloudinary will return it, if not it will ask our function to generate it, then cache it.
lessonDuration 4m 59s
We cover installing Playwright, which will run the headless browser for us, in a way that doesn't also install unused browser bundles, reducing the size and allowing us to deploy it to netlify in a function. We also cover a set of Playwright APIs like page.setContent, page.evaluate, page.screenshot, and how to return a base64 encoded image from a lambda function. We also cover passing values from native browser functions like getBoundingClientRect back to our node script and fixing a few errors along the way.
lessonDuration 2m 47s
We scaffold out a new GitHub repo to deploy netlify functions and a small index.html file, while covering Makefile basics and netlify.toml. The lesson ends with a working Netlify site.
course
How does e-commerce work on the Jamstack? Jason Lengstorf and [Thor 雷神](https://twitter.com/thorwebdev) teamed up on _Learn With Jason_ to [build a serverless Stripe Checkout implementation](https://www.learnwithjason.dev/sell-products-on-the-jamstack). This collection is a cleaned up, egghead-style tutorial for selling products on a Jamstack site using Netlify Functions and Stripe Checkout.
lessonDuration 4m 47sFree
Set up the HTML and CSS for a website to sell products and configure it for local development using [Netlify Dev](https://www.netlify.com/products/dev/?utm_source=egghead&utm_medium=setup-ntl-dev-jl&utm_campaign=devex).
lessonDuration 2m 1s
Netlify will automatically build your Gatsby website whenever you push new code to your repository but what about content changes in Contentful. In this lesson, you will learn how to use Contentful webhook feature to trigger a Netlify build whenever you publish or delete new content on Contentful
lessonDuration 2m 11sFree
In this lesson, you will learn how to push your website code to Github and Build and deploy it using Netlify
lessonDuration 1m 46s
Run [Netlify Functions](https://www.netlify.com/products/functions/?utm_source=egghead&utm_medium=stripe-products-jl&utm_campaign=devex) locally with access to environment variables using [Netlify Dev](https://www.netlify.com/products/dev/?utm_source=egghead&utm_medium=stripe-products-jl&utm_campaign=devex).
lessonDuration 2m 25s
Use [Netlify Functions](https://www.netlify.com/products/functions/?utm_source=egghead&utm_medium=stripe-products-jl&utm_campaign=devex) to create a serverless function (also called a _lambda function_) that returns data in JSON format.
course
OpenGraph images are the images you see when you paste a link into a social platform and it "unfurls" into an image, title, and description. This happens on Twitter, Discord, Slack, and many other platforms. This collection goes over everything from designing OpenGraph images in Figma, to implementing them in CodeSandbox, to returning headless browser screenshots from Netlify Functions, and finally using Cloudinary as a write-through cache. You will come away from this collection with the ability to ship an API that you can use on any of your sites, and also on-demand, that can generate images for not only OpenGraph unfurls, but also for Instagram, GitHub, and more. Using headless browsers with playwright to generate our images means we get full access to all the responsive power of CSS and all the logical power of JS to handle layout, importing assets like pngs, choosing different fonts, and more. The image below is generated via the project you'll build and deploy in this course 
course
Starting from a prebuilt frontend, Jason Lengstorf guides you through the creation of a "Corgi Up-boop App" that uses Netlify Functions and Hasura. You can view [the deployed final product on Netlify](https://egghead-serverless-functions.netlify.app/). You'll set up the Netlify CLI, and configure a local development environment before writing and deploying functions with a few different use cases. The first example function bypasses CORS restrictions to retrieve corgi data from an example third-party API. Next, you'll configure environmental variables to securely communicate with the Unsplash API without exposing private keys to the client. Serverless functions don't persist data by themselves, so we will use Hasura to create a GraphQL API for tracking the number of "boops" each corgi receives. This course is an excellent illustration of the speed of Serverless functions, and how fast you can implement functionality in your web applications.
lessonDuration 2m 18s
In this course, we've built and deployed a serverless application that loads data, combines data, uses environment variables safely, protects API keys, works around CORS, and utilizes data from a database. We additionally, deployed our application using Netlify's continuous deployment process. With continuous deployment, Netlify will automatically deploy new versions of our site when pushing commits to the connected Git repository. This also facilitates features like Deploy Previews, branch deploys, and split testing. The live website to the course project can be found here: https://suspicious-banach-da7b44.netlify.app/
lessonDuration 3m 28s
Environment variables set in a `.env` file can be imported using the Netlify CLI with the following command: `netlify env:import`. This allows you to manage environment variables directly on Netlify, providing the benefit of security and flexibility of sharing environment variables with your team. From inside Netlify, you can access the environment variables in: `Site settings` > `Build & deploy` > `Environment` > `Environment variables`
lessonDuration 7m 12s
CORS limits websites from communicating with other domains without the full consent of both sites. Consuming data from a 3rd Party REST API makes it difficult since we can't properly configure the appropriate CORS headers. To solve this, we'll set up a proxy server to request the data using a Netlify function that avoids CORS altogether. The Third-Party API that we'll be working with will provide the following data: `id`, `name`, `favoriteSong` for each corgi. [http://no-cors-api.netlify.app/api/corgis](http://no-cors-api.netlify.app/api/corgis) We will also use `node-fetch` a light-weight module that brings the `fetch` API to fetch the data into our application.
lessonDuration 1m 28s
There are a few ways you can run Netlify serverless functions while you are developing them. You can: - Navigate to the directory under the `/.netlify/functions/` path - Curl them using the full URL - Use an app like Postman
lessonDuration 2m 14s
Netlify makes deploying to production a breeze by configuring your Netlify CLI to your Netlify account and integrating with GitHub. We'll log in to Netlify through the CLI and initialize a site by completing all the options that the CLI runs us through. Once this is done, Netlify will trigger new builds for your site every time you push to GitHub.
lessonDuration 3m 54s
Netlify makes developing serverless functions easy with the netlify-cli (`ntl` for short). You'll be able to build and test functions locally as well as publish your functions from the CLI. We will install netlify-cli globally and create a `netlify.toml` file that will configure where the CLI should look to run functions that we define, in our case `functions/`. When the application is served up, Netlify runs functions under `/.netlify/functions/`.
lessonDuration 1m 6sFree
In this lesson, we'll walk through using Netlify to host and deploy a new website project that uses TakeShape CMS to manage its content. We'll start by connecting our Github project to Netlify. To pull in our content with the TakeShape API, we'll use environment variables to customize our Netlify deployment. Once configured, we'll deploy our site and preview it with its new unique Netlify URL.
lessonDuration 1m 1sFree
In this lesson, we'll use the TakeShape CMS to update existing content on a website. We'll walk through navigating the TakeShape dashboard, updating the header on a website, and using Netlify to trigger a new deployment to refresh the content on the website.