Ai Coding Tools

How to Use GitHub Copilot to Write a Complete Web App in Under 2 Hours

By BTW Team3 min read

How to Use GitHub Copilot to Write a Complete Web App in Under 2 Hours

If you're a solo founder or indie hacker, you know that time is often your most valuable resource. The idea of building a complete web app in under two hours might sound far-fetched, but with GitHub Copilot, it’s not just a pipe dream—it’s a very achievable goal. In 2026, AI tools like Copilot have matured significantly, making them indispensable for speeding up coding tasks. Here’s how to leverage Copilot effectively to get your web app off the ground quickly.

Prerequisites: What You Need to Get Started

Before diving in, make sure you have the following:

  1. GitHub Account: You’ll need this to use Copilot.
  2. Visual Studio Code (VS Code): The primary IDE that integrates well with Copilot.
  3. Node.js installed: For backend functionality.
  4. Basic knowledge of JavaScript: Familiarity with syntax and concepts will help.
  5. Copilot Subscription: Pricing is $10/month or $100/year as of June 2026.

Step 1: Set Up Your Environment (15 minutes)

  1. Install VS Code: Download and install it from here.
  2. Install GitHub Copilot: Go to the Extensions Marketplace in VS Code, search for “GitHub Copilot,” and install it.
  3. Create a New Project: Open a new terminal and run:
    mkdir my-web-app && cd my-web-app
    npm init -y
    

Step 2: Generate Your Web App Skeleton (30 minutes)

  1. Create an index.html file: This will be the main entry point of your app.

  2. Use Copilot to scaffold HTML: Start by typing:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>My Web App</title>
    </head>
    <body>
    

    Copilot will suggest the closing tags and common elements like a header or footer.

  3. Add a Simple Form: Type a comment like <!-- Form for user input --> and let Copilot fill in the form structure.

  4. Create a script.js file: Start typing:

    function submitForm() {
        // Logic to handle form submission
    }
    

    Copilot will help fill in the remaining code.

Step 3: Implement Backend Logic (30 minutes)

  1. Set Up a Simple Express Server: Create a server.js file and type:

    const express = require('express');
    const app = express();
    const PORT = process.env.PORT || 3000;
    
    app.listen(PORT, () => {
        console.log(`Server running on http://localhost:${PORT}`);
    });
    

    Copilot will help generate the rest of the Express setup.

  2. Handle Form Submission: Add a route to handle POST requests from your HTML form. Start typing:

    app.post('/submit', (req, res) => {
        // Logic to handle data
    });
    

Step 4: Style Your Web App (25 minutes)

  1. Create a styles.css file: Start with basic styles.
  2. Use Copilot for CSS: Type a comment like /* Button styles */ and let Copilot suggest styles.

Step 5: Test Your Web App (20 minutes)

  1. Run Your Server: In the terminal, run:
    node server.js
    
  2. Open Your Browser: Navigate to http://localhost:3000 and test the form.

What Could Go Wrong

  • Dependencies Not Installed: Make sure to run npm install express if you encounter errors.
  • Missing HTML Elements: If Copilot doesn’t generate elements you need, you may have to write them manually.

What's Next: Deployment

Once your app is functional, consider deploying it using services like Vercel or Heroku. You can follow their respective documentation to get your app live.

Conclusion: Start Here

Using GitHub Copilot, building a web app in under two hours is entirely feasible. It’s not just about writing code faster; it’s about leveraging AI to fill in the gaps and streamline your workflow. Start by setting up your environment and follow the steps outlined above.

What We Actually Use

For our own projects, we use GitHub Copilot alongside tools like Vercel for deployment and Postman for API testing. This combo keeps our workflow smooth and efficient.

Follow Our Building Journey

Weekly podcast episodes on tools we're testing, products we're shipping, and lessons from building in public.

Subscribe

Never miss an episode

Subscribe to Built This Week for weekly insights on AI tools, product building, and startup lessons from Ryz Labs.

Subscribe
Ai Coding Tools

Why Most Developers Overlook the Best AI Coding Tools: Common Myths Explained

Why Most Developers Overlook the Best AI Coding Tools: Common Myths Explained As a solo founder or indie hacker, you're likely aware of the potential of AI coding tools but might s

Jun 3, 20264 min read
Ai Coding Tools

Why Most Developers Overrate AI Coding Assistants: 5 Common Misconceptions

Why Most Developers Overrate AI Coding Assistants: 5 Common Misconceptions As of 2026, AI coding assistants are all the rage in development circles. Many developers tout their prod

Jun 3, 20264 min read
Ai Coding Tools

7 Best AI Coding Tools for Beginners to Start Coding in 2026

7 Best AI Coding Tools for Beginners to Start Coding in 2026 As a beginner in coding, you might feel overwhelmed by the sheer number of tools and resources available. It's a common

Jun 3, 20265 min read
Ai Coding Tools

How to Overcome Common Pitfalls When Using AI Coding Assistants

How to Overcome Common Pitfalls When Using AI Coding Assistants (2026) In 2026, AI coding assistants are more prevalent than ever, but they can also lead to some frustrating pitfal

Jun 3, 20263 min read
Ai Coding Tools

How to Create Your First AI-Powered App in 2 Days with No Experience

How to Create Your First AIPowered App in 2 Days with No Experience Have you ever thought about building an AIpowered app but felt overwhelmed by the complexity of coding and machi

Jun 3, 20264 min read
Ai Coding Tools

Why Codeium is Overrated: My Experience as an Expert Developer

Why Codeium is Overrated: My Experience as an Expert Developer As a developer who's been in the trenches for years, I’ve seen a parade of tools come and go. Codeium, marketed as an

Jun 3, 20264 min read