Ai Coding Tools

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

By BTW Team4 min read

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

If you’re like most indie hackers or solo founders, the thought of building an entire application can feel overwhelming. You might have great ideas, but the coding part? That’s where the anxiety kicks in. Enter GitHub Copilot—a powerful AI-powered coding assistant that can help you whip up your first full application in under two hours. But does it live up to the hype? Let's dig in.

Prerequisites: What You Need to Get Started

Before we dive into the nitty-gritty, make sure you have the following:

  • GitHub Account: Sign up for free if you don’t have one.
  • Visual Studio Code: Download and install this code editor. It’s free and widely used.
  • GitHub Copilot Subscription: As of June 2026, it's $10/month after a free trial.
  • Basic Understanding of JavaScript: You don’t need to be an expert, but familiarity with the syntax will help.

Step 1: Set Up Your Environment

Setting up your environment takes about 15 minutes:

  1. Install Visual Studio Code: Follow the installation instructions for your OS.
  2. Install GitHub Copilot: Open VS Code, go to Extensions (Ctrl+Shift+X), and search for "GitHub Copilot." Click install.
  3. Sign in to GitHub: Once installed, you’ll be prompted to sign in to your GitHub account to activate Copilot.

Expected Output: You should see a Copilot icon in the bottom right corner of VS Code, indicating it's active.

Step 2: Create Your First Application

Let’s build a simple web application that displays a list of your favorite books. This will take about 1.5 hours.

  1. Create a New Folder: Name it FavoriteBooksApp.

  2. Open the Terminal: Inside VS Code, go to Terminal > New Terminal.

  3. Initialize a New Project:

    mkdir FavoriteBooksApp
    cd FavoriteBooksApp
    npm init -y
    
  4. Install Express:

    npm install express
    
  5. Create Your Main File: Create a file called app.js.

  6. Start Coding with Copilot: In app.js, start typing:

    const express = require('express');
    const app = express();
    const port = 3000;
    
    app.get('/', (req, res) => {
        res.send('Welcome to my favorite books app!');
    });
    
    app.listen(port, () => {
        console.log(`App listening at http://localhost:${port}`);
    });
    

    As you type, Copilot will suggest completions. Accept the suggestions by pressing Tab.

Expected Output: Running node app.js in the terminal should give you a message indicating the app is running.

Step 3: Add Functionality to Display Books

Next, let’s enhance the application to display a list of books. This should take about 30 minutes.

  1. Create a Books Array: Add the following code before the app.get route:

    const books = [
        { title: '1984', author: 'George Orwell' },
        { title: 'To Kill a Mockingbird', author: 'Harper Lee' },
        { title: 'The Great Gatsby', author: 'F. Scott Fitzgerald' }
    ];
    
  2. Modify the Route: Change the app.get route to:

    app.get('/books', (req, res) => {
        res.json(books);
    });
    

Expected Output: Navigating to http://localhost:3000/books in your browser should display the list of books in JSON format.

Troubleshooting: What Could Go Wrong

  • Copilot Fails to Suggest: If Copilot isn’t suggesting code, ensure you’re connected to the internet and signed in to GitHub.
  • Syntax Errors: If you see errors, double-check your code for typos or missing brackets.

What's Next?

Now that you’ve built a basic application, consider adding features like a front-end interface using React or Vue.js, or even deploying your app using Heroku or Vercel. Each of these steps can be done using Copilot for code suggestions.

Conclusion: Start Here

Using GitHub Copilot can dramatically reduce the time it takes to code your first application. In our experience, it’s a solid tool for beginners and seasoned developers alike. It won’t write perfect code every time, but it can get you 80% of the way there, especially if you’re just starting out.

So, if you’re ready to build your first app, grab your tools, and get coding with Copilot. You might be surprised at how much you can accomplish in just two hours.

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

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time As a developer, whether you're just starting out or have years of experience, debugging can feel like a neverend

Oct 16, 20265 min read
Ai Coding Tools

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow As developers, we’re always on the lookout for ways to streamline our workflow and boost productivity. Enter

Oct 14, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools That Could Hurt Your Development Process

5 Myths About AI Coding Tools That Could Hurt Your Development Process As a solo founder or indie hacker, you might be lured by the promises of AI coding tools that claim to simpli

Oct 13, 20264 min read
Ai Coding Tools

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026 As AI coding tools have become an integral part of a developer's toolkit in 2026, many are still stumbling over

Oct 12, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026 As we dive into 2026, the landscape of AI coding tools has evolved significantly, yet many developers still

Oct 11, 20263 min read
Ai Coding Tools

Why AI Coding Assistants Are Overrated for Beginners in 2026

Why AI Coding Assistants Are Overrated for Beginners in 2026 As a solo founder or indie hacker, it’s tempting to think that AI coding assistants are the silver bullet to jumpstart

Oct 10, 20263 min read