Ai Coding Tools

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

By BTW Team3 min read

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

In short

A step-by-step tutorial on leveraging GitHub Copilot to create a fully functional app quickly, tailored for new developers.

If you're a solo founder or indie hacker, you know that time is money. The thought of coding an app from scratch can be daunting, especially if you're not a seasoned developer. But what if I told you that you could leverage AI to speed up the process? Enter GitHub Copilot. In this guide, I’ll show you how to use GitHub Copilot to code a simple app in under two hours.

Time Estimate and Prerequisites

Time Estimate: You can finish this in about 2 hours if you follow the steps closely.

Prerequisites:

  • A GitHub account (Free)
  • Visual Studio Code (Free)
  • GitHub Copilot subscription ($10/mo, no free tier)
  • Basic understanding of JavaScript (or Python) is helpful but not mandatory

Step 1: Set Up Your Environment

  1. Install Visual Studio Code: Download it from here.

  2. Install GitHub Copilot: Open Visual Studio Code, go to Extensions (Ctrl+Shift+X), search for "GitHub Copilot," and install it.

    GitHub Copilot Installation

  3. Authenticate Copilot: Follow the prompts to log in to your GitHub account and enable Copilot.

Step 2: Create a New Project

  1. Create a New Directory: Open your terminal and run:
    mkdir my-simple-app
    cd my-simple-app
    
  2. Initialize a Git Repository:
    git init
    
  3. Create an index.js file: In Visual Studio Code, create a new file called index.js.

Step 3: Start Coding with Copilot

Now, let’s leverage Copilot to generate some code. Here’s how you can do it effectively:

  1. Define Your App: Start by typing a comment that defines what your app should do. For instance:

    // A simple web server that responds with "Hello, World!" 
    

    Copilot will suggest code for you. Accept the suggestion by pressing Tab.

  2. Add Functionality: Continue providing comments for additional features. For example:

    // Add a route to return the current date
    

    Copilot will generate the necessary code again.

  3. Iterate: Keep iterating by defining features in comments and allowing Copilot to fill in the gaps.

Step 4: Run Your App

  1. Install Dependencies: If you’re using Express.js, run:
    npm init -y
    npm install express
    
  2. Start Your Server: Add a script in your package.json file:
    "scripts": {
      "start": "node index.js"
    }
    
  3. Run the App: In your terminal:
    npm start
    

You should see your app running locally, and you can access it via http://localhost:3000.

What Could Go Wrong

  • Copilot Misinterpretation: Sometimes Copilot may suggest code that doesn't align with your goals. Always review and test the code it generates.
  • Dependencies: If you forget to install required packages, your app won't run. Always check the console for errors.

What's Next?

After building this simple app, consider adding more features or experimenting with different programming languages. Use Copilot to help you learn by suggesting code snippets for new functionalities.

Conclusion

GitHub Copilot can significantly reduce your coding time, making it a valuable tool for indie hackers and solo founders. It’s not perfect, but with some guidance, you can create a functional app in under two hours.

Start Here: If you're ready to dive in, get your GitHub account set up, install Copilot, and start coding your first app today.

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