How to deploy web applications to Netlify

Frontend Engineer who loves building tools.
Search for a command to run...

Frontend Engineer who loves building tools.
No comments yet. Be the first to comment.
Performance is a touchy subject in software engineering. It’s one thing to write code and ship it; it’s another thing entirely to make it faster and more enjoyable for your users — and the next developers after you. In this article, we will look at h...
Animations seem to be a necessity these days in frontend development, improving the user experience in apps by a significant margin. Thankfully vue.js shipped two built-in components that abstract away the complexities of animating our apps; transiti...
Arrays have a lot of helpful higher-order functions that make working with them easier. Our focus in this article will be the sort() method, this method has both easy and complex use cases which we'll be looking at in this article. First look at the ...
Gridsome is a static site generator used for building powerful frontend applications, it was built on the Vue.js framework. One of the beauties of Gridsome apart from its ability to generate server-side rendered applications is its compatibility with...
Build hooks are unique URLs used to trigger a build on the Netlify. They can be used to refresh the content on your website after you’ve published or unpublished content in your Storyblok space. Getting the hook URL from Netlify To create one, open y...

Netlify is a really powerful platform that not only allows you to host your frontend applications but also leverage the power of the JAMStack by utilising its other features like the serverless functions, analytics, and form processing.
Hosting on Netlify is so easy that you can literally drag and drop the folder containing your site and it would be deployed immediately. Although this technique only works for static sites, If you wanted to deploy web apps built with frontend frameworks this way, you would have to run the build command locally first, then drop the built directory on to Netlify.
Assuming you've already created an account on [netlify.com](https://netlify.com "Netlify.com"), on your dashboard, click "New site from Git".

You should be taken to another page where you get to choose which Git provider you want to use (this should be where the source code exists). Authentication would be required after selecting the provider and you should now see a list of all your repositories after that.
After selecting the repository you intend to deploy from, you'd be shown a page where you add your build settings:

When setting your build command, be sure to enter the full command as well as the correct publish directory. I am currently deploying a Vue app, so the full command to build the app is npm run build, while the directory that the built files are placed is dist which happens to be in the project's root. Other frameworks might have different build commands or publish directory so be sure to enter the correct ones else the deployment will fail.
Click deploy when finished and you should see your site build with a randomly generated URL for previews.

You can also set up a custom domain name if you wish, [here's a guide to set up a custom domain on Netlify.](https://docs.netlify.com/domains-https/custom-domains/#definitions "How to setup custom domains on Netlify")