Ai Coding Tools

How to Use GitHub Copilot to Write Your First Application in Under 2 Hours

By BTW Team4 min read

How to Use GitHub Copilot to Write Your First Application in Under 2 Hours

If you're like many indie hackers or solo founders, the thought of coding your first application can be daunting. But what if I told you that with the right tools, you could build something functional in under two hours? Enter GitHub Copilot, an AI-powered coding assistant that can streamline your development process. As of 2026, it's become a game-changing tool for beginners and experienced developers alike. Let’s dive into how you can leverage Copilot to get your first app off the ground quickly.

Prerequisites: What You Need to Get Started

Before we jump into the coding, here’s what you need to have ready:

  1. GitHub Account: Sign up for free if you don’t already have one.
  2. Visual Studio Code: Download and install this code editor; it’s the most compatible with Copilot.
  3. GitHub Copilot Subscription: You'll need to subscribe to Copilot for $10/month after a 30-day free trial.
  4. Basic Understanding of JavaScript: Familiarity with JavaScript will help, but Copilot can guide you through the syntax.

Setting Up GitHub Copilot

  1. Install Visual Studio Code: If you haven't already, go to the Visual Studio Code website and download the app for your operating system.
  2. Install GitHub Copilot Extension: Open Visual Studio Code, go to the Extensions view (Ctrl+Shift+X), and search for "GitHub Copilot." Click "Install."
  3. Log In to GitHub: Once installed, you'll be prompted to sign in to your GitHub account. Follow the prompts to authorize Copilot.

Building Your First Application

Step 1: Set Up Your Project

  1. Create a New Directory: Open your terminal and create a new folder for your project:
    mkdir my-first-app
    cd my-first-app
    
  2. Initialize a Git Repository:
    git init
    
  3. Create Your Initial Files: Start with an index.html and app.js:
    touch index.html app.js
    

Step 2: Use Copilot to Generate Code

  1. Open index.html: Start by typing the basic HTML structure. Copilot will suggest completions as you type.

    <!DOCTYPE html>
    <html>
    <head>
        <title>My First App</title>
    </head>
    <body>
        <h1>Hello, World!</h1>
        <script src="app.js"></script>
    </body>
    </html>
    

    Copilot will fill in the rest based on your patterns.

  2. Open app.js: Now, let’s add some interactivity. Type:

    function greet() {
        alert("Welcome to my first app!");
    }
    

    As you type, Copilot will suggest ways to enhance this function.

  3. Add Event Listeners: Type a comment for Copilot:

    // Add event listener to greet on page load
    

    Copilot will likely suggest:

    window.onload = greet;
    

Step 3: Run Your Application

  1. Open index.html in a Browser: You can simply double-click the file or use an extension like Live Server in Visual Studio Code for live reloading.
  2. Test the Functionality: When the page loads, you should see an alert welcoming you to your app.

Troubleshooting Common Issues

  • Copilot Doesn't Suggest Anything: Make sure you're logged in and the extension is enabled. Sometimes, restarting Visual Studio Code can help.
  • Errors in Code: If you encounter errors, check your syntax. Copilot can make mistakes, so always review its suggestions.

What's Next?

Once you’ve built your first application, consider expanding its functionality. Here are a few ideas:

  • Add a CSS File: Style your app with custom styles.
  • Integrate APIs: Use a public API to fetch and display data.
  • Deploy Your App: Explore platforms like Netlify or Vercel for easy deployment.

Conclusion: Start Here

GitHub Copilot is a powerful tool that can significantly reduce the time it takes to build your first application. With just a few hours and some basic coding knowledge, you can have a functional app ready to go. Remember, the key is to experiment and learn from the suggestions Copilot provides.

If you’re ready to dive in, start by setting up your environment as outlined above, and let Copilot guide you through the coding process. Happy building!

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

Bolt.new vs GitHub Copilot: AI Coding Assistance Showdown

Bolt.new vs GitHub Copilot: AI Coding Assistance Showdown As a solo founder, I often find myself juggling multiple tasks, and coding can sometimes feel like a mountain to climb. En

May 28, 20263 min read
Ai Coding Tools

How to Automate Your Coding Workflows Using AI in 3 Simple Steps

How to Automate Your Coding Workflows Using AI in 3 Simple Steps As indie hackers and solo founders, we often find ourselves buried under repetitive coding tasks that eat away at o

May 28, 20264 min read
Ai Coding Tools

Why AI Coding Tools are Overrated: The Common Misconceptions

Why AI Coding Tools are Overrated: The Common Misconceptions (2026) As a solo founder or indie hacker, it’s easy to get swept up in the hype around AI coding tools. Social media is

May 28, 20264 min read
Ai Coding Tools

Cursor vs GitHub Copilot: Which AI Tool is Better for Coding Assistance in 2026?

Cursor vs GitHub Copilot: Which AI Tool is Better for Coding Assistance in 2026? As a solo founder or indie hacker, finding the right tools to streamline coding can be a game chang

May 28, 20263 min read
Ai Coding Tools

Understanding AI Coders: Lovable vs Cursor - Which is Better for Indie Developers?

Understanding AI Coders: Lovable vs Cursor Which is Better for Indie Developers? As an indie developer, you're likely always on the lookout for tools that can simplify your coding

May 28, 20263 min read
Ai Coding Tools

Why Most Developers Overlook Codeium: 5 Myths Busted

Why Most Developers Overlook Codeium: 5 Myths Busted In 2026, we’re seeing a surge in AI coding tools, but one name often gets overlooked: Codeium. You might be wondering why, espe

May 28, 20264 min read