Ai Coding Tools

How to Use GitHub Copilot to Code a Simple App in Under 2 Hours

By BTW Team3 min read

How to Use GitHub Copilot to Code a Simple App in Under 2 Hours

If you're a solo founder or indie hacker, you know that time is money. The thought of coding an app from scratch can be daunting, especially if you're not a seasoned developer. But what if I told you that you could leverage AI to speed up the process? Enter GitHub Copilot. In this guide, I’ll show you how to use GitHub Copilot to code a simple app in under two hours.

Time Estimate and Prerequisites

Time Estimate: You can finish this in about 2 hours if you follow the steps closely.

Prerequisites:

  • A GitHub account (Free)
  • Visual Studio Code (Free)
  • GitHub Copilot subscription ($10/mo, no free tier)
  • Basic understanding of JavaScript (or Python) is helpful but not mandatory

Step 1: Set Up Your Environment

  1. Install Visual Studio Code: Download it from here.

  2. Install GitHub Copilot: Open Visual Studio Code, go to Extensions (Ctrl+Shift+X), search for "GitHub Copilot," and install it.

    GitHub Copilot Installation

  3. Authenticate Copilot: Follow the prompts to log in to your GitHub account and enable Copilot.

Step 2: Create a New Project

  1. Create a New Directory: Open your terminal and run:
    mkdir my-simple-app
    cd my-simple-app
    
  2. Initialize a Git Repository:
    git init
    
  3. Create an index.js file: In Visual Studio Code, create a new file called index.js.

Step 3: Start Coding with Copilot

Now, let’s leverage Copilot to generate some code. Here’s how you can do it effectively:

  1. Define Your App: Start by typing a comment that defines what your app should do. For instance:

    // A simple web server that responds with "Hello, World!" 
    

    Copilot will suggest code for you. Accept the suggestion by pressing Tab.

  2. Add Functionality: Continue providing comments for additional features. For example:

    // Add a route to return the current date
    

    Copilot will generate the necessary code again.

  3. Iterate: Keep iterating by defining features in comments and allowing Copilot to fill in the gaps.

Step 4: Run Your App

  1. Install Dependencies: If you’re using Express.js, run:
    npm init -y
    npm install express
    
  2. Start Your Server: Add a script in your package.json file:
    "scripts": {
      "start": "node index.js"
    }
    
  3. Run the App: In your terminal:
    npm start
    

You should see your app running locally, and you can access it via http://localhost:3000.

What Could Go Wrong

  • Copilot Misinterpretation: Sometimes Copilot may suggest code that doesn't align with your goals. Always review and test the code it generates.
  • Dependencies: If you forget to install required packages, your app won't run. Always check the console for errors.

What's Next?

After building this simple app, consider adding more features or experimenting with different programming languages. Use Copilot to help you learn by suggesting code snippets for new functionalities.

Conclusion

GitHub Copilot can significantly reduce your coding time, making it a valuable tool for indie hackers and solo founders. It’s not perfect, but with some guidance, you can create a functional app in under two hours.

Start Here: If you're ready to dive in, get your GitHub account set up, install Copilot, and start coding your first app today.

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

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow As developers, we’re always on the lookout for ways to streamline our workflow and boost productivity. Enter

Oct 14, 20264 min read
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