⚠️ This lesson is retired and might contain outdated information.

Netlify CLI

Tom Chant
InstructorTom Chant
Share this video with your friends

Social Share Links

Send Tweet
Published 2 years ago
Updated 2 months ago

This lesson focuses on integrating serverless functions into a web application using Netlify CLI. Tom demonstrates the installation process of Netlify CLI globally and explains its purpose. It guides you through using the netlify init command to configure their site and connect it to an existing Netlify site.

It's important of correctly identifying the git remote origin. By the end of the lesson, you will have a clear understanding of how to set up their project directory and use Netlify CLI to initialize their site for serverless function integration.

[00:00] Okay, so to integrate a serverless function, we need the Netlify CLI. So let's come back to the terminal, and just to help out, I've created a document here called terminalcommands.md, and I've just listed the terminal commands that we'll be using in this

[00:16] scrim. So we're going to come in here with the first command, which is install netlify-cli-g. So I'm installing this globally, that's what the dash g means. So we can hit enter, and eventually you'll get shown something like this. Now if we just type netlify and hit enter,

[00:35] we'll get taken to a list of Netlify commands. And the one that we're really interested in is init for initialize, and we're going to use that to configure our site. So down here, let's say netlify init. And now it's going to ask us a series of questions. The first one is

[00:54] connect this directory to an existing Netlify site. Now we've got two options here, and we can just move up or down with the arrow keys. But the first option is the one we want, so I'll just press enter. Now it's asking us if we want to use the current git remote origin, and it's correctly

[01:09] identified the wewingit underscore deploy repository that I'm using. So that's fine, click enter. And there we are, it says directory linked. That is what we want to see, and if we go back to the full screen of VS Code, we've now got a new .netlify folder. Okay, in the next

[01:28] scrim, we'll use the CLI to give us the boilerplate for a serverless function.

egghead
egghead
~ just now

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today