Ai Coding Tools

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

By BTW Team4 min read

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

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!

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

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
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for Beginners

10 Common Mistakes When Using AI Coding Tools for Beginners As a beginner in coding, diving into AI coding tools can feel like a doubleedged sword. On one hand, these tools promise

Oct 8, 20264 min read
Ai Coding Tools

5 Common Misconceptions About AI Coding Tools and Why They Hold You Back

5 Common Misconceptions About AI Coding Tools and Why They Hold You Back As a solo founder or indie hacker, you might be considering leveraging AI coding tools to boost your produc

Oct 7, 20264 min read