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

Why Most People Overrate GitHub Copilot: Truth vs Fiction

Why Most People Overrate GitHub Copilot: Truth vs Fiction In 2026, the buzz around AI tools like GitHub Copilot is louder than ever. Many developers swear by it, claiming it boosts

Jun 12, 20264 min read
Ai Coding Tools

Cursor vs GitHub Copilot: Which AI Coding Tool Is Best for Advanced Developers in 2026?

Cursor vs GitHub Copilot: Which AI Coding Tool Is Best for Advanced Developers in 2026? As an advanced developer, you're likely familiar with the challenges of keeping your code ef

Jun 12, 20263 min read
Ai Coding Tools

The $100/Month AI Coding Toolkit for Indie Developers

The $100/Month AI Coding Toolkit for Indie Developers If you're an indie developer, you know that finding the right tools can make or break your productivity. With AI coding tools

Jun 12, 20266 min read
Ai Coding Tools

How to Implement AI Code Review in Your Workflow in Just 30 Minutes

How to Implement AI Code Review in Your Workflow in Just 30 Minutes If you're like many indie hackers and solo founders, you're constantly juggling code quality and the speed of de

Jun 12, 20264 min read
Ai Coding Tools

How to Use Cursor for Advanced Code Autocompletion in 60 Minutes

How to Use Cursor for Advanced Code Autocompletion in 60 Minutes If you're a solo founder or indie hacker, you know that time is precious. You want to code faster and smarter, and

Jun 12, 20263 min read
Ai Coding Tools

How to Implement Cursor AI for Efficient Coding in 30 Minutes

How to Implement Cursor AI for Efficient Coding in 30 Minutes If you're a solo founder or an indie hacker, you know that coding can be both a timeconsuming and frustrating endeavor

Jun 12, 20264 min read