Ai Coding Tools

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

By BTW Team4 min read

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

If you're a beginner looking to dip your toes into coding, you might feel overwhelmed by the sheer volume of resources, tools, and advice out there. The good news? You can leverage AI to speed up your development process significantly. GitHub Copilot is a powerful AI coding assistant that can help you build a simple app in under 2 hours. Yes, you read that right.

In this guide, I’ll walk you through the process of using GitHub Copilot to create a basic app, share some tips on what works, and highlight the limitations of this tool. Let’s dive in!

Prerequisites: What You’ll Need

Before we begin, make sure you have the following:

  • GitHub Account: Free to create, needed to use Copilot.
  • Visual Studio Code: Download and install the latest version.
  • GitHub Copilot Subscription: As of June 2026, this costs $10/month or $100/year.
  • Basic Understanding of JavaScript: Familiarity with syntax and basic concepts will help, but Copilot can assist you along the way.

Step-by-Step Guide to Building Your App

Step 1: Set Up Your Environment

  1. Install Visual Studio Code: If you haven't already, grab the latest version from the official site.
  2. Install GitHub Copilot: Open VS Code, go to Extensions, and search for GitHub Copilot to install it.
  3. Sign In: Make sure you log in to your GitHub account to activate Copilot.

Step 2: Create a New Project

  1. Open VS Code and create a new folder for your app project.
  2. Inside that folder, create an index.html file and a script.js file.

Step 3: Start Coding with Copilot

  1. HTML Structure: In index.html, type the following to create a basic HTML template:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Simple App</title>
    </head>
    <body>
        <h1>Welcome to My Simple App</h1>
        <div id="app"></div>
        <script src="script.js"></script>
    </body>
    </html>
    

    Copilot will likely suggest the rest of the boilerplate code for you.

  2. JavaScript Functionality: In script.js, start typing a function to fetch data. For example:

    async function fetchData() {
        const response = await fetch('https://api.example.com/data');
        const data = await response.json();
        document.getElementById('app').innerHTML = JSON.stringify(data);
    }
    

    Copilot will assist you in completing the function based on what you type.

  3. Call the Function: At the end of the file, call fetchData() to execute it when the page loads.

Step 4: Run Your App

  1. Open your index.html file in a web browser.
  2. You should see "Welcome to My Simple App" and any fetched data displayed.

Step 5: Troubleshooting Common Issues

  • CORS Errors: If you encounter Cross-Origin Resource Sharing (CORS) issues, it’s because some APIs restrict access. Try using a different API or set up a local server.
  • Data Not Displaying: Ensure the API endpoint is correct and returning data. Use console logs to debug.

Limitations of GitHub Copilot

While GitHub Copilot is incredibly useful, it does have limitations:

  • Context Awareness: Copilot sometimes suggests code that doesn’t fit your specific use case. You may need to tweak its suggestions.
  • Dependency Management: It won’t automatically install dependencies, which can lead to confusion for beginners.
  • Learning Curve: If you don’t have a basic understanding of JavaScript, you might struggle with understanding Copilot’s suggestions.

What We Actually Use

In our experience, GitHub Copilot is a great tool for speeding up development. However, we also rely on other tools for a complete workflow:

| Tool | Pricing | Best For | Limitations | Our Take | |------------------|-----------------------------|-------------------------------|-----------------------------------|------------------------------------| | GitHub Copilot | $10/month | Code suggestions | Context issues | Essential for speeding up coding | | Postman | Free + $12/user/month | API testing | Limited to API interactions | Great for testing APIs | | Visual Studio Code| Free | Code editing | Requires extensions for advanced features | Our go-to editor | | Netlify | Free tier + $19/month | Hosting static sites | Costs can add up with traffic | Easy deployment for front-end apps | | Heroku | Free tier + $7/month | Hosting backend services | Limited free tier resources | Good for quick prototypes |

Conclusion: Start Here

If you’re a beginner looking to create a simple app, GitHub Copilot is a fantastic tool to help you get started quickly. Follow the steps outlined above, and you should be able to create a working app in under 2 hours. Just remember to keep learning and iterating on your projects.

If you find Copilot's suggestions aren’t quite right, don’t hesitate to modify them—it's all part of the learning process.

Ready to dive into your coding journey? Grab your GitHub account, set up Visual Studio Code, and let’s build something amazing!

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

How to Automate Coding Tasks Using AI in 30 Minutes

How to Automate Coding Tasks Using AI in 30 Minutes As indie hackers and solo founders, we often find ourselves drowning in repetitive coding tasks that eat away at our productivit

Jun 8, 20264 min read
Ai Coding Tools

The Ultimate Guide to 10 AI Tools Every Developer Must Try in 2026

The Ultimate Guide to 10 AI Tools Every Developer Must Try in 2026 As a developer in 2026, you’re likely feeling the pressure to keep up with the rapidly evolving landscape of AI t

Jun 8, 20265 min read
Ai Coding Tools

How to Boost Your Coding Speed by 50% with AI Tools in 7 Days

How to Boost Your Coding Speed by 50% with AI Tools in 7 Days As a solo founder or indie hacker, you know that time is money, and coding efficiently can drastically affect your pro

Jun 8, 20265 min read
Ai Coding Tools

Why GitHub Copilot is Overrated: 5 Key Reasons

Why GitHub Copilot is Overrated: 5 Key Reasons In 2026, the buzz around AI coding tools like GitHub Copilot still hasn’t faded, but let’s be real: it’s not all it’s cracked up to b

Jun 8, 20263 min read
Ai Coding Tools

How to Boost Your Coding Speed by 50% with AI Tools in 2 Weeks

How to Boost Your Coding Speed by 50% with AI Tools in 2026 As indie hackers and solo founders, we often find ourselves juggling multiple projects with limited time. If you’ve ever

Jun 8, 20265 min read
Ai Coding Tools

AI Coding Tools vs Traditional IDEs: A 2026 Perspective

AI Coding Tools vs Traditional IDEs: A 2026 Perspective As we step into 2026, the landscape of coding has evolved dramatically. The rise of AI coding tools has forced us to reconsi

Jun 8, 20264 min read