Learnwizy Technologies Logo

Learnwizy Technologies

Class 36: Introduction to Deployment & Cloud Platforms

You've learned to build both frontend and backend applications. But how do you make your application accessible to users around the world? This is where deployment comes in. Today, we'll introduce the concepts of web application deployment and explore the world of Cloud Computing and various deployment platforms.


Understanding Web Application Deployment


Introduction to Cloud Computing

Cloud computing is the on-demand delivery of IT resources over the internet with pay-as-you-go pricing. Instead of owning and maintaining your own computing infrastructure, you can access services like servers, storage, databases, networking, analytics, and intelligence from a cloud provider.

Cloud Service Models

Major Cloud Providers (High-Level Overview)


Platform-as-a-Service (PaaS) for Web Apps

PaaS solutions are excellent for web developers because they abstract away much of the underlying infrastructure, allowing you to focus on writing code.


Deploying a Simple Static Frontend Application

Let's walk through the general steps to deploy a static frontend application (like a React app) using Netlify or Vercel.

Prerequisites:

Steps (using Netlify as an example):

  1. Build your application:

    For a React app created with Vite, this generates the optimized static files in a dist folder.

    cd my-react-app
    npm run build
    
  2. Sign up for Netlify (or Vercel):

    Go to netlify.com and sign up using your GitHub account.

  3. Connect to GitHub repository:

    In Netlify, click "Add new site" -> "Import an existing project" -> "Deploy with GitHub". Authorize Netlify to access your repositories.

  4. Select your repository: Choose the GitHub repository containing your React project.
  5. Configure build settings:

    Netlify will usually auto-detect your framework (e.g., React with Vite).

    • Build command: npm run build
    • Publish directory: dist (or build for Create React App)
  6. Deploy site: Click "Deploy site". Netlify will clone your repo, run the build command, and deploy the contents of your publish directory to a global CDN.
  7. Automatic builds and deployments:

    Once set up, Netlify automatically detects new commits to your connected Git branch (e.g., main) and triggers a new build and deployment. This is Continuous Deployment (CD) for your frontend.

  8. Custom domains: You can easily configure a custom domain for your deployed application.

Environment Variables for Production

When deploying your application, you must handle sensitive data (like API keys, database credentials, JWT secrets) securely. Never commit these directly to your Git repository.

This class introduced you to the crucial step of deployment and the power of cloud platforms. While we focused on static frontend deployment, the principles extend to backend applications as well. In the next class, we'll explore Docker and containerization, which are fundamental technologies for modern deployments.