Ai Coding Tools

How to Use GitHub Copilot to Code a Complete App 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 demonstrating how to harness GitHub Copilot to rapidly develop a fully functional app within two hours.

If you're like me, you sometimes find yourself stuck in the endless cycle of coding, debugging, and staring at a blank screen, wondering how to turn your app idea into reality. Enter GitHub Copilot, an AI coding assistant that claims to make coding faster and more efficient. In this guide, I’ll show you how to leverage GitHub Copilot to build a complete app in just 2 hours. Sounds ambitious, right? But with the right approach, it’s possible.

What You Need to Get Started

Prerequisites

Before we dive in, here’s what you need:

  • GitHub Account: Free or Pro (Pro is $10/month).
  • Visual Studio Code: Free code editor.
  • GitHub Copilot Subscription: $10/month or $100/year.
  • Basic knowledge of JavaScript and Node.js: You should be comfortable with coding concepts.

Estimated Time

You can finish this project in about 2 hours if you have everything set up and ready to go.

Step-by-Step Guide to Building Your App

Step 1: Set Up Your Environment

  1. Install Visual Studio Code: Download and install it from here.
  2. Install GitHub Copilot: Open Visual Studio Code, go to Extensions, and search for "GitHub Copilot". Install it and log in with your GitHub account.

Step 2: Start a New Project

  1. Create a New Folder: Name it after your app (e.g., MyCoolApp).
  2. Open Terminal: Inside Visual Studio Code, open a terminal and run:
    npm init -y
    
  3. Install Dependencies: For a simple app, install Express.js:
    npm install express
    

Step 3: Build Your App with Copilot

  1. Create an index.js file: This will be your main file.

  2. Ask Copilot for Help: Start typing a comment for the main function, like:

    // Create a simple Express server
    

    Copilot will suggest code. Accept its suggestions by pressing Tab.

  3. Define Routes: Keep using comments to guide Copilot:

    // Define a GET route for '/'
    

    Accept the generated code.

Step 4: Test Your App

  1. Run Your Server: In the terminal, execute:
    node index.js
    
  2. Open Your Browser: Go to http://localhost:3000 to see your app in action.

Expected Outputs

By the end of these steps, you should have a simple web app running locally. It might be a basic CRUD application or a simple API, depending on how much you leverage Copilot’s suggestions.

Troubleshooting Common Issues

  • Copilot Suggestions Are Off: If Copilot is providing irrelevant suggestions, try rephrasing your comments or being more specific.
  • Server Not Running: Ensure you have Node.js installed and check for any syntax errors in your code.

What’s Next?

Once you have your app running, consider adding more features:

  • Implement user authentication.
  • Add a database connection using MongoDB or PostgreSQL.
  • Host your app on platforms like Heroku or Vercel.

Conclusion: Start Here with GitHub Copilot

In my experience, GitHub Copilot can significantly speed up the coding process, especially for indie hackers and solo founders. It’s not perfect, and you’ll still need to apply your coding knowledge to refine the suggestions, but it's a powerful tool when used correctly.

If you're looking to build an app quickly, I highly recommend giving GitHub Copilot a try.

What We Actually Use

We’ve tested Copilot alongside other coding tools and found it to be a game-changer for rapid prototyping. While it’s not infallible, its ability to generate boilerplate code saves us tons of time.

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