Ai Coding Tools

How to Create a Simple Web App Using GitHub Copilot in 2 Hours

By BTW Team3 min read

Comparing tools? See the AI tools tested on the show.

In short

Step-by-step tutorial on building a fully functional web application using GitHub Copilot in just 2 hours, perfect for neophyte developers looking to leverage AI assistance.

If you’re a beginner looking to build a simple web app but feel overwhelmed by the coding process, you're not alone. Many indie hackers and solo founders face the same challenge: you have an idea but don’t know how to translate it into code. Thankfully, tools like GitHub Copilot can make this process much more manageable. In this guide, I’ll walk you through how to create a basic web app using GitHub Copilot in just 2 hours.

Prerequisites: What You Need Before You Start

Before diving into the coding, make sure you have the following:

  • GitHub Account: Sign up for free if you don’t have one.
  • Visual Studio Code (VS Code): Download and install this code editor.
  • GitHub Copilot: Get the Copilot subscription. Pricing is $10/month or $100/year.
  • Basic Knowledge of HTML, CSS, and JavaScript: You don’t need to be an expert, but familiarity will help.

Step 1: Set Up Your Environment (30 minutes)

  1. Install VS Code: Open VS Code and set up your workspace.
  2. Install GitHub Copilot: Go to the Extensions panel (Ctrl+Shift+X) and search for "GitHub Copilot". Click "Install".
  3. Create a New Project Folder: Name it something like “my-web-app”.
  4. Create Basic Files: In your project folder, create index.html, style.css, and script.js.

Step 2: Using GitHub Copilot to Generate Code (1 hour)

HTML Structure

Start by opening index.html and begin typing out the basic structure. Copilot will suggest code snippets as you type.

  • Example: Type <!DOCTYPE html> and see Copilot suggest the rest of the boilerplate code.

CSS Styling

Next, move to style.css. You can type comments to let Copilot know what you want.

  • Example: Type /* Style the header */ and let Copilot fill in the styles.

JavaScript Functionality

In script.js, start with a comment about the functionality you want.

  • Example: Type // Function to handle button click and let Copilot suggest the function body.

Running Your App

Once you have your HTML, CSS, and JavaScript set up, open your index.html file in a browser to see your web app in action.

Step 3: Troubleshooting Common Issues (15 minutes)

It’s possible to encounter a few bumps along the way. Here are some common issues and solutions:

  • Copilot Suggestions are Off: If Copilot isn’t suggesting relevant code, try to rephrase your comments or provide more context.
  • Browser Not Displaying Changes: Make sure to refresh your browser after making changes to your files.

Step 4: Deploying Your Web App (15 minutes)

Once your web app is working, you can deploy it for free using GitHub Pages.

  1. Push Your Code to GitHub: Initialize a git repository in your project folder and push your code.
  2. Enable GitHub Pages: Go to your GitHub repository settings, scroll down to the "GitHub Pages" section, and select the main branch for deployment.

Conclusion: What’s Next?

Congratulations! You’ve just built a simple web app using GitHub Copilot in about 2 hours. If you found this process helpful, consider exploring more complex features and functionalities.

Start Here:

If you're eager to continue your journey, I recommend checking out the following resources:

  • Explore more advanced tutorials on deploying full-stack apps.
  • Listen to the Built This Week podcast for insights on tools and strategies we use in our building journey.

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools
Ai Coding Tools

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them)

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them) In the everevolving landscape of AI coding tools, it's easy to get swept up in the hype. As indie hackers and s

Nov 30, 20263 min read
Ai Coding Tools

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026 In 2026, the landscape for indie hackers and solo founders has evolved significantly, especially with the advent

Nov 26, 20264 min read
Ai Coding Tools

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026 If you’re a developer stuck maintaining legacy code, you know the frustration. It’s like navigating a maze blindfolde

Nov 23, 20264 min read
Ai Coding Tools

10 AI Coding Tools That Will Save You Hours of Debugging in 2026

10 AI Coding Tools That Will Save You Hours of Debugging in 2026 Debugging can feel like a neverending cycle of frustration. Whether you're a solo founder or an indie hacker, spend

Nov 18, 20265 min read
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for MVP Development

10 Common Mistakes When Using AI Coding Tools for MVP Development As a founder in 2026, you’re likely aware that AI coding tools can significantly speed up the MVP development proc

Nov 16, 20264 min read
Ai Coding Tools

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026 As a beginner developer, you’ve probably come across a ton of buzz surrounding AI coding tools. But with all the hyp

Nov 12, 20263 min read