Ai Coding Tools

How to Code a Simple App Using GitHub Copilot in 2 Hours

By BTW Team3 min read

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

In short

A step-by-step tutorial guiding users through creating a simple application from scratch using GitHub Copilot within a 2-hour timeframe.

If you've ever stared at a blank screen, wondering how to start coding your next app, you're not alone. Many indie hackers and solo founders face this daunting moment. Enter GitHub Copilot—a tool that claims to assist you in writing code faster and with fewer headaches. But does it really deliver? In this guide, I’ll show you how to build a simple app using GitHub Copilot in just 2 hours.

Prerequisites: What You Need to Get Started

Before diving in, make sure you have the following:

  • GitHub Account: You'll need this to access Copilot.
  • Visual Studio Code: Download and install it if you don’t have it yet.
  • GitHub Copilot Subscription: Costs $10/month after a 30-day free trial.
  • Basic Knowledge of JavaScript: Familiarity with syntax will help, but Copilot can guide you through.

Step-by-Step: Building Your Simple App

Step 1: Set Up Your Environment (15 minutes)

  1. Install Visual Studio Code: Go to Visual Studio Code and download the installer.
  2. Install GitHub Copilot: Search for the Copilot extension in the Visual Studio Code marketplace and install it.
  3. Sign In: Log in to your GitHub account to activate Copilot.

Step 2: Create a New Project (15 minutes)

  1. Open a New Folder: In Visual Studio Code, create a new folder for your app.
  2. Initialize a Git Repository:
    git init
    
  3. Create an index.html File: This will be the main file for your app.

Step 3: Code the App with Copilot (60 minutes)

  • In index.html, Start with Basic Structure: Type <!DOCTYPE html> and wait for Copilot to suggest the rest of the HTML boilerplate.

  • Add a Title and Header: Type <!-- Add a title -->, and Copilot will likely suggest something like:

    <title>My Simple App</title>
    <h1>Welcome to My Simple App</h1>
    
  • Create a Form: Begin typing <!-- Create a form -->, and Copilot will generate the HTML for a simple form with input fields.

  • JavaScript Functionality: Create a new file called app.js. Start by typing function submitForm() { and let Copilot suggest the logic to handle form submission.

Step 4: Test Your App (20 minutes)

  1. Open the HTML file in your browser.
  2. Interact with the Form: Fill it out and ensure that it behaves as expected. If something breaks, Copilot can often help troubleshoot with suggestions.

Step 5: Deploy Your App (10 minutes)

  1. Choose a Hosting Service: For quick deployment, consider Netlify or GitHub Pages.
  2. Follow the Hosting Instructions: Each service has straightforward steps for deploying static websites.

What Could Go Wrong

  • Copilot Misses Context: Sometimes, Copilot may suggest code that doesn't fit your needs. You might have to tweak its suggestions significantly.
  • Limited to JavaScript: If you’re looking to work in Python or another language, Copilot's suggestions may not be as helpful.

What's Next?

Once you’ve built your app, consider adding features like user authentication or a database. You might also want to explore other tools like Replit for collaborative coding or Figma for designing your app's interface.

Conclusion: Start Here

If you're ready to tackle your next side project, GitHub Copilot is a fantastic tool to help you get past the initial coding hurdles. With a little setup and a few hours of focused work, you can bring your ideas to life.

In our experience, GitHub Copilot excels at providing quick code suggestions but requires a foundational understanding of JavaScript to maximize its potential.

What We Actually Use: We mostly rely on GitHub Copilot for quick prototyping but still prefer manual coding for production-level applications due to the nuances that Copilot sometimes overlooks.

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