Ai Coding Tools

How to Use GitHub Copilot to Code a Simple Web App in Under 2 Hours

By BTW Team4 min read

How to Use GitHub Copilot to Code a Simple Web App in Under 2 Hours

If you've ever struggled with coding a web app from scratch, you're not alone. Many indie hackers and solo founders find themselves bogged down by the nitty-gritty details of coding when they really just want to ship their idea. That's where GitHub Copilot comes in. This AI-powered coding assistant can help you write code faster, but it’s not magic; you still need to know what to do. In this guide, I'll walk you through using GitHub Copilot to code a simple web app in under 2 hours, based on my own experience.

Prerequisites: What You’ll Need

Before diving in, make sure you have the following:

  • GitHub Account: Free tier available.
  • Visual Studio Code: Download and install it if you haven’t already.
  • GitHub Copilot Subscription: $10/month after a 60-day free trial (as of March 2026).
  • Basic Knowledge of HTML, CSS, and JavaScript: You should know the basics, as Copilot won't teach you how to code.

Step 1: Set Up Your Development Environment

  1. Open Visual Studio Code.
  2. Install the GitHub Copilot extension from the marketplace.
  3. Create a new folder for your web app project and open it in VS Code.

Expected Output

You will have a clean workspace ready for coding, with Copilot activated.

Step 2: Start Coding Your Web App

Now, let’s build a simple to-do list web app. Follow these steps:

  1. Create an HTML File: Create a file named index.html and type <!DOCTYPE html> and hit enter. Copilot will suggest a full HTML boilerplate.

  2. Add Basic Structure: Type header and hit enter. Copilot will help populate the header section.

  3. Create a Form: Start typing form and let Copilot fill in the rest. This is where users will add their tasks.

  4. Style with CSS: Create a styles.css file and type body { to get some basic styling suggestions from Copilot.

  5. Add JavaScript Functionality: Create a script.js file. Start with function addTask() and see how Copilot suggests the logic for adding tasks to your to-do list.

Expected Output

By the end of this step, you should have a basic web app structure with HTML, CSS, and JavaScript files all set up.

Step 3: Test Your Web App

  1. Open index.html in your browser.
  2. Test adding tasks through the form.
  3. Check if tasks appear correctly in the list.

Troubleshooting

  • Tasks Not Appearing: Double-check your JavaScript logic. Copilot may not always get it right on the first try.
  • Styling Issues: Make sure your CSS file is linked correctly in the HTML.

Step 4: Deploy Your Web App

You can use GitHub Pages for free hosting:

  1. Create a GitHub repository for your project.
  2. Push your code to GitHub.
  3. Go to the repository settings and enable GitHub Pages.

Expected Output

Your web app should now be live and accessible via a GitHub Pages URL.

What Could Go Wrong

  • Copilot Suggestions: Sometimes, Copilot might suggest code that doesn't fit your needs. Be prepared to tweak the suggestions.
  • Browser Compatibility: Ensure that the features you use are compatible with popular browsers.

What’s Next

Now that you have a basic web app, consider expanding its features. You could add user authentication, a database for storing tasks, or even a mobile-friendly design. Explore frameworks like React or Vue.js to level up your app.

Conclusion: Start Here

If you're looking to build a simple web app quickly, GitHub Copilot can be an invaluable tool in your arsenal. With a little preparation and understanding of the basics, you can leverage its capabilities to code effectively in under 2 hours. Remember, it’s not about letting Copilot do all the work; it’s about enhancing your coding workflow.

What We Actually Use

For our projects, we use GitHub Copilot for rapid prototyping. It saves us hours of coding time and helps us focus on the architecture rather than the syntax.

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

Top 3 AI Coding Tools for Expert Developers: How They Can Enhance Your Coding Speed

Top 3 AI Coding Tools for Expert Developers: How They Can Enhance Your Coding Speed As expert developers, we often find ourselves in the weeds, spending countless hours debugging o

Mar 28, 20263 min read
Ai Coding Tools

How to Integrate Cursor and GitHub Copilot in Your Workflow

How to Integrate Cursor and GitHub Copilot in Your Workflow As a solo founder or indie hacker, finding ways to maximize coding efficiency is crucial. Enter Cursor and GitHub Copilo

Mar 28, 20263 min read
Ai Coding Tools

How to Improve Your Coding Speed Using AI Tools in 60 Minutes

How to Improve Your Coding Speed Using AI Tools in 60 Minutes As indie hackers and solo founders, we often find ourselves racing against the clock. Whether you're building your lat

Mar 28, 20264 min read
Ai Coding Tools

Best AI Coding Tools for Beginners to Start Using in 2026

Best AI Coding Tools for Beginners to Start Using in 2026 As a beginner in coding, choosing the right tools can feel overwhelming. With a plethora of AI coding tools emerging, how

Mar 28, 20265 min read
Ai Coding Tools

How to Use GitHub Copilot to Complete Your First Coding Project in 1 Hour

How to Use GitHub Copilot to Complete Your First Coding Project in 1 Hour If you’re a beginner coder, the idea of completing your first coding project can feel overwhelming. You mi

Mar 28, 20264 min read
Ai Coding Tools

Cursor vs GitHub Copilot: Which AI Tool Boosts Your Coding Speed Better?

Cursor vs GitHub Copilot: Which AI Tool Boosts Your Coding Speed Better? As indie hackers and side project builders, we’re always looking for ways to optimize our coding workflows.

Mar 28, 20263 min read