Deployment using netlify-cli

Using the GitHub repository is not the only way to deploy a JavaScript App on Netlify, this can also be done by using Netlify CLI (Command Line Interface).

Step 1: Install netlify-cli dependency in your project.

This dependency helps us to deploy our application directly from CLI and provide deployed URL.

npm install netlify-cli -g

Step 2: Initialize netlify in your project.

If the netlify account is logged in, it show the team and here we can set site name. As soon as we add site name, hit enter, then netlify cli detect project structure and files and finally provide site URL.

Step 3: Run netlify deploy

This command will compile all files of project application, asking for publish directory, and Netlify starts building the deployed link for application.

Step 4: Navigate to the created link

After deployment, we have JavaScript application live, and anyone can access that project through link.



How to Deploy JavaScript Apps with Netlify ?

Deploying a JavaScript Application on Netlify is easy. You just need to run a few commands in your computer’s command prompt. Netlify works well with Git, so whenever you make changes to your code and push them to your Git repository, Netlify automatically updates your deployed app.

The below methods can be used to deploy JavaScript apps with Netlify:

Table of Content

  • Using Drag and Drop
  • Steps to deploy javascript application using Git repository
  • Deployment using netlify-cli

Similar Reads

Using Drag and Drop

You can drag and drop the project folder of the JavaScript project to deploy it with Netlify by following the below steps....

Steps to deploy JavaScript application using Git repository

Netlify offers seamless integration with Git repositories (GitHub, GitLab, Bitbucket) for continuous deployment. When changes are pushed to the repository, Netlify automatically triggers a build and deploys the updated app....

Deployment using netlify-cli

Using the GitHub repository is not the only way to deploy a JavaScript App on Netlify, this can also be done by using Netlify CLI (Command Line Interface)....