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

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time As a developer, whether you're just starting out or have years of experience, debugging can feel like a neverend

Oct 16, 20265 min read
Ai Coding Tools

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow As developers, we’re always on the lookout for ways to streamline our workflow and boost productivity. Enter

Oct 14, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools That Could Hurt Your Development Process

5 Myths About AI Coding Tools That Could Hurt Your Development Process As a solo founder or indie hacker, you might be lured by the promises of AI coding tools that claim to simpli

Oct 13, 20264 min read
Ai Coding Tools

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026 As AI coding tools have become an integral part of a developer's toolkit in 2026, many are still stumbling over

Oct 12, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026 As we dive into 2026, the landscape of AI coding tools has evolved significantly, yet many developers still

Oct 11, 20263 min read
Ai Coding Tools

Why AI Coding Assistants Are Overrated for Beginners in 2026

Why AI Coding Assistants Are Overrated for Beginners in 2026 As a solo founder or indie hacker, it’s tempting to think that AI coding assistants are the silver bullet to jumpstart

Oct 10, 20263 min read