Ai Coding Tools

How to Use GitHub Copilot: Build Your First App in Under 2 Hours

By BTW Team4 min read

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

In short

A step-by-step guide on using GitHub Copilot to create your first application quickly and efficiently, tailored for newcomers wanting to leverage AI coding assistance.

If you're a solo founder or indie hacker, you know that building your first app can be daunting. You want to get something up and running fast, but the learning curve can be steep. Enter GitHub Copilot—a tool that promises to make coding easier by suggesting entire lines or blocks of code as you type. But does it really deliver? In this guide, I’ll walk you through how to use GitHub Copilot to build your first app in under two hours.

Prerequisites: What You Need to Get Started

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

  1. GitHub Account: Sign up at GitHub if you don’t have one.
  2. Visual Studio Code: Download and install VS Code.
  3. GitHub Copilot Subscription: Copilot costs $10/month or $100/year after a free trial.
  4. Basic JavaScript Knowledge: Familiarity with JavaScript will help, but Copilot can guide you through if you’re a complete beginner.

Step-by-Step: Building Your First App

Step 1: Set Up Your Environment (15 Minutes)

  • Open Visual Studio Code.

  • Create a new folder for your project.

  • Open a terminal in VS Code and initialize a new Node.js project by running:

    npm init -y
    
  • Install Express.js for your web server:

    npm install express
    

Step 2: Start Coding with GitHub Copilot (1 Hour)

  1. Create a new file called app.js.

  2. Enable GitHub Copilot: If you’ve installed the Copilot extension, it should be ready to use. Start typing code and watch Copilot suggest lines. For instance, type const express = require('express'); and see Copilot offer the next lines.

  3. Build a Simple Web Server: Type the following comment to get Copilot to generate a basic web server:

    // Create a simple Express server
    

    Copilot should suggest a full server setup. Accept the suggestion and tweak it as necessary.

Step 3: Test Your App (30 Minutes)

  • Run your app with:

    node app.js
    
  • Open your browser and visit http://localhost:3000 to see if it’s running. If Copilot did its job, you should see a message like "Hello World".

Step 4: Deploy Your App (30 Minutes)

  1. Deploy to Heroku: If you want to get your app live, you can deploy it to Heroku. Install the Heroku CLI and log in:

    heroku login
    
  2. Create a new Heroku app:

    heroku create my-first-app
    
  3. Push your code to Heroku:

    git add .
    git commit -m "Initial commit"
    git push heroku master
    
  4. Visit the URL provided by Heroku to see your live app.

Troubleshooting Common Issues

  • Copilot Not Suggesting Code: Ensure your subscription is active and the extension is enabled in VS Code.
  • Server Not Running: Check for errors in your terminal. If you see issues, Copilot’s suggestions may need manual tweaking.

What’s Next?

Now that you have a basic app, consider adding features like user authentication or a database. GitHub Copilot can help here too—just ask it to generate code snippets for specific functionalities.

Pricing Breakdown of GitHub Copilot

| Feature | Pricing | Best For | Limitations | Our Take | |-----------------------|-----------------------|--------------------------------|----------------------------------|-------------------------------| | GitHub Copilot | $10/mo or $100/yr | Beginners and experienced devs | May produce incorrect suggestions | We use this for rapid prototyping and learning new APIs. |

Conclusion: Start Here

If you’re looking to get your first app off the ground quickly, GitHub Copilot can be a real asset. The combination of AI-driven suggestions and a supportive coding environment in VS Code makes it feasible to build something functional in under two hours. Just keep in mind that while Copilot is powerful, it’s not infallible—be ready to edit and refine its suggestions.

Start your journey by signing up for GitHub Copilot today and tackle that first app you’ve been dreaming of!

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