Deploy a Static Application to Production on Netlify

Jason Lengstorf
InstructorJason Lengstorf
Share this video with your friends

Social Share Links

Send Tweet
Published 4 years ago
Updated 4 years ago

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/

Jason Lengstorf: [0:00] That's what it takes to set up serverless functions, so that you can read data, combine data from multiple services, protect your environment variables, make sure that you're working around course restrictions, so that you can write data to a database that you own, a custom database, and persist things in your serverless apps.

[0:20] This is a completely static site. It's deployed to Netlify, and we can finalize that deploy by adding everything here. We're going to Netlify and import our .env file to make sure that we've got everything. There it goes. Now, we can git add everything, git commit, working app, git push. We can Netlify open and go watch that thing build.

[0:56] Here is our deploy. It's in progress. It should take about 10 seconds, because we've got no build step. It's just got to deploy those functions for us. It's built. It's running. Everything is gone. Our functions are getting uploaded. If we go and look at our live site, here are our dogs. They are being loaded.

[1:22] Here's unsplash data. Here's our custom API data. Here's our custom database data. If I click to boop, that number gets incremented. If I reload the page, that number is persisted.

[1:36] We have built and deployed an entire serverless app that is able to load data from third parties, it's able to use environment variables safely, it's able to protect API keys, it's able to work around cores restrictions and we were able to set up a database and persist data, all while still being able to use that Jamstack deployment process that keeps us from having to deal with a bunch of complicated server setup and config.

[2:03] Hope that was fun. I hope you feel like you've learned something. I'd love to see what you build with this. Make sure you come and find me @jlengstorf on Twitter or at jason.af. We'll see on the Internet. Bye, friends.

egghead
egghead
~ 19 minutes ago

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