Ai Coding Tools

How to Build Your First App Using GitHub Copilot in 2 Hours

By BTW Team3 min read

How to Build Your First App Using GitHub Copilot in 2 Hours

If you’re like many indie hackers and solo founders, the thought of building your first app might feel daunting. You might think you need to be a coding wizard or spend weeks learning programming languages. But what if I told you that with GitHub Copilot, you can get a working app up and running in just 2 hours? Yes, it’s possible, and I’m going to walk you through how to do it.

Prerequisites: What You Need Before You Start

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

  • A GitHub account: Free.
  • Visual Studio Code: Free code editor.
  • GitHub Copilot: $10/month after a 30-day free trial.
  • Basic understanding of JavaScript: Familiarity with coding concepts will help, but Copilot can assist with most syntax.

Step 1: Set Up Your Environment (15 Minutes)

  1. Create your GitHub account if you don’t already have one.
  2. Install Visual Studio Code from the official site.
  3. Install the GitHub Copilot extension in Visual Studio Code:
    • Open Visual Studio Code.
    • Go to Extensions (Ctrl+Shift+X).
    • Search for "GitHub Copilot" and install it.
  4. Sign in to GitHub Copilot when prompted.

Expected Output:

You should have Visual Studio Code open with GitHub Copilot activated.

Step 2: Start a New Project (30 Minutes)

  1. Create a new directory for your app:
    mkdir my-first-app
    cd my-first-app
    
  2. Initialize a new Node.js project:
    npm init -y
    
  3. Install Express (a minimal web framework for Node.js):
    npm install express
    

Expected Output:

A basic Node.js project structure with package.json and node_modules folder.

Step 3: Build Your App (1 Hour)

Here’s where GitHub Copilot shines. You can ask it to generate code snippets. For example, to create a simple web server:

  1. Open a new file called app.js in your project directory.

  2. Type a comment to prompt Copilot:

    // Create a simple Express server
    

    Copilot will suggest code. Accept the suggestion (Tab key).

  3. Add more functionality:

    • To create an endpoint, type:
    // Create a GET endpoint for '/'
    

    Copilot will likely generate a route for you.

  4. Run your app:

    node app.js
    

Expected Output:

A simple web server running on localhost:3000 that responds with "Hello World!"

Troubleshooting: What Could Go Wrong

  • Copilot doesn’t suggest code: Make sure you’re connected to the internet and Copilot is enabled in VS Code.
  • Error messages: Double-check your code for typos. Copilot is helpful, but it’s not perfect.

What's Next: Building on Your Foundation

Once you’ve built your first app, consider expanding its functionality. Here are some ideas:

  • Add a database using MongoDB or PostgreSQL.
  • Implement user authentication with Passport.js.
  • Deploy your app using platforms like Heroku or Vercel.

Conclusion: Start Here

Building your first app doesn’t have to be a long, painful process. With GitHub Copilot, you can leverage AI to assist you in writing code quickly and efficiently. Set aside 2 hours, follow these steps, and you’ll have a functioning app ready to be expanded.

If you’re ready to take the plunge, go ahead and give it a shot!

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

How to Use AI Tools to Code Your First App in 24 Hours

How to Use AI Tools to Code Your First App in 24 Hours Building your first app can feel like a monumental task, especially if you're new to coding. But what if I told you that with

Apr 25, 20264 min read
Ai Coding Tools

Cursor vs. GitHub Copilot: Which AI Tool is Better for Freelance Developers in 2026?

Cursor vs. GitHub Copilot: Which AI Tool is Better for Freelance Developers in 2026? As a freelance developer, you're always on the lookout for tools that can boost your productivi

Apr 25, 20263 min read
Ai Coding Tools

How to Build Your First Chatbot with AI in Just 2 Hours

How to Build Your First Chatbot with AI in Just 2 Hours Building a chatbot might sound daunting, especially if you're just starting out. The good news is that with the right tools

Apr 25, 20264 min read
Ai Coding Tools

5 Lessons Learned From Using GitHub Copilot for 6 Months

5 Lessons Learned From Using GitHub Copilot for 6 Months As a solo founder, diving into the world of AI coding tools can feel daunting. I decided to give GitHub Copilot a try for s

Apr 25, 20264 min read
Ai Coding Tools

Best 7 AI Coding Tools for Faster Development in 2026

Best 7 AI Coding Tools for Faster Development in 2026 As a solo developer or indie hacker, you know that time is your most valuable resource. In 2026, the landscape of coding tools

Apr 25, 20265 min read
Ai Coding Tools

Cursor vs GitHub Copilot: Which AI Tool is Better for Beginners in 2026?

Cursor vs GitHub Copilot: Which AI Tool is Better for Beginners in 2026? When diving into the world of coding, the right tools can make or break your experience as a beginner. With

Apr 25, 20263 min read