Ai Coding Tools

How to Use GitHub Copilot: Build Your First App in 1 Hour

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 simple application from scratch in just 60 minutes, suitable for novice coders.

Have you ever stared at a blank code editor, feeling overwhelmed by the prospect of building your first app? You're not alone. Many indie hackers and solo founders face this daunting challenge. But what if I told you that with GitHub Copilot, you could build a functional app in just one hour? In this guide, I'll walk you through the process, sharing practical steps, honest limitations, and my own experiences with this AI coding tool.

Prerequisites: What You Need to Get Started

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

  • A GitHub Account: If you don’t have one, sign up for free.
  • Visual Studio Code (VS Code): Download and install this code editor if you haven't already.
  • GitHub Copilot Subscription: GitHub Copilot costs $10/month or $100/year. There's a free trial available for new users, so you can test it out without committing upfront.
  • Basic Understanding of JavaScript: This tutorial will use JavaScript as the primary language, so some familiarity will help.

Step 1: Set Up Your Environment

  1. Install Visual Studio Code: Open VS Code and install the GitHub Copilot extension from the marketplace.
  2. Sign in to GitHub: Once the extension is installed, sign in to your GitHub account to activate Copilot.
  3. Create a New Project: Open the terminal in VS Code and create a new directory for your app. For example, run:
    mkdir my-first-app
    cd my-first-app
    npm init -y
    
    This initializes a new Node.js project.

Step 2: Build Your First App

2.1 Create Your Main File

Create a new JavaScript file called app.js in your project directory. This is where we’ll write our code.

2.2 Use GitHub Copilot to Generate Code

Start typing a comment about what you want to do. For example, type // Create a simple HTTP server and hit enter. Copilot will suggest code to create an HTTP server:

const http = require('http');

const hostname = '127.0.0.1';
const port = 3000;

const server = http.createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
  res.end('Hello World!\n');
});

server.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});

2.3 Run Your App

To run your app, go back to the terminal and execute:

node app.js

You should see Server running at http://127.0.0.1:3000/ in your terminal. Open this URL in your browser, and you should see "Hello World!".

Step 3: Troubleshooting Common Issues

Common Problems

  • Copilot Not Suggesting Code: Ensure you’re signed in to GitHub and that the extension is active.
  • Syntax Errors: If you encounter syntax errors, double-check the code suggestions and tweak them as needed.

What Could Go Wrong

If your app doesn’t run, make sure you have Node.js installed and that you’re in the correct directory in your terminal.

Step 4: What's Next?

Now that you’ve built a simple app, consider expanding its functionality. Here are some ideas:

  • Add routing to handle different endpoints.
  • Incorporate a front-end framework like React for a more interactive UI.
  • Explore database integration with MongoDB or PostgreSQL.

Conclusion: Start Here

Using GitHub Copilot, you can build your first app in just one hour. The key is to embrace the suggestions it provides and iterate on them. While Copilot can significantly speed up your coding process, remember it’s not perfect; you’ll still need to verify and understand the code it generates.

What We Actually Use

In our experience, GitHub Copilot is a great tool for rapidly prototyping ideas, but it's essential to combine it with a solid understanding of the programming concepts you're working with. If you're looking for alternatives, consider tools like Tabnine or Kite, but we've found Copilot to be the most effective for our needs.

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