Ai Coding Tools

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

By BTW Team4 min read

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

If you’re a solo founder or indie hacker, you know that time is everything. You might find yourself stuck on coding tasks when you could be focusing on building your product. What if I told you that you could leverage AI to speed up your coding process? In this guide, I’ll show you how to use GitHub Copilot to code a simple app in about 2 hours. Let’s dive in!

Prerequisites: What You Need Before You Start

Before you jump into coding with Copilot, make sure you have the following:

  1. GitHub Account: You’ll need an account to access Copilot.
  2. Visual Studio Code (VS Code): This is where you'll be coding. Download it if you haven’t already.
  3. GitHub Copilot Subscription: It costs $10/month for individuals. There’s a free trial available for new users.
  4. Basic Knowledge of JavaScript: We’ll be building a simple to-do app, so familiarity with JavaScript will help.

Step-by-Step Guide to Building Your App

1. Install GitHub Copilot

First, install the GitHub Copilot extension in VS Code:

  • Open VS Code.
  • Go to Extensions (or press Ctrl+Shift+X).
  • Search for "GitHub Copilot" and click install.

Expected Output: You should see the Copilot icon in your sidebar.

2. Create Your Project Directory

Now, let’s set up your project:

  • Open the terminal in VS Code.
  • Create a new directory: mkdir simple-todo-app && cd simple-todo-app
  • Initialize a new Node.js project: npm init -y

Expected Output: You should have a new directory with a package.json file.

3. Set Up Your Basic HTML Structure

Create an index.html file:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Simple To-Do App</title>
</head>
<body>
    <h1>My To-Do List</h1>
    <input type="text" id="taskInput" placeholder="Add a new task...">
    <button id="addTaskButton">Add Task</button>
    <ul id="taskList"></ul>
    <script src="app.js"></script>
</body>
</html>

Expected Output: You should have a basic HTML structure ready.

4. Use Copilot to Code the JavaScript Logic

Create an app.js file and start writing the logic for adding tasks. Begin with a comment to guide Copilot:

// This function adds a task to the list

Expected Output: Copilot will likely suggest a function for adding tasks. Accept the suggestion.

5. Implement Task Removal Logic

Next, add the ability to remove tasks. Again, guide Copilot with a comment:

// This function removes a task from the list

Expected Output: Copilot should generate the removal logic for you.

6. Test Your App

Open index.html in your browser and test adding and removing tasks.

Troubleshooting: If something doesn't work as expected, check the console for errors. Common issues could be due to typos or missing elements.

7. Polish Your App

Once the basic functionality is working, consider adding some CSS for styling. You can either do this manually or use Copilot to suggest styles.

What Could Go Wrong

  1. Copilot Misunderstandings: Sometimes, Copilot might not get your intentions right. Don’t hesitate to modify the generated code.
  2. Browser Compatibility: Ensure your app works across different browsers. Test it on Chrome and Firefox.
  3. Performance Issues: If you add too many tasks, check how the app performs. You might need to optimize the code.

What's Next?

Once you’ve built your simple app, consider expanding its functionality:

  • Add a local storage feature to save tasks.
  • Implement user authentication.
  • Create a mobile-friendly version.

Conclusion: Start Here

Using GitHub Copilot can drastically reduce the time you spend coding, allowing you to focus on bringing your product to market. If you follow this guide, you can build a simple to-do app in about 2 hours. Don’t hesitate to experiment with Copilot and explore its capabilities!

What We Actually Use

We actively use GitHub Copilot for various coding tasks. While it saves us time, we always review the generated code for accuracy and performance.

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

Cursor vs Codeium: Which AI Coding Assistant Delivers More Value in 2026?

Cursor vs Codeium: Which AI Coding Assistant Delivers More Value in 2026? As a solo founder or side project builder, you’re likely familiar with the struggle of optimizing your cod

Jun 1, 20263 min read
Ai Coding Tools

How to Use GitHub Copilot to Increase Productivity by 50% in 30 Days

How to Use GitHub Copilot to Increase Productivity by 50% in 30 Days If you’re a coder, chances are you’ve heard the hype around GitHub Copilot. It’s an AIpowered coding assistant

Jun 1, 20264 min read
Ai Coding Tools

How to Build Your First Web App with AI Assistance in 2 Hours

How to Build Your First Web App with AI Assistance in 2026 If you’re a solo founder or indie hacker looking to build your first web app, you might be overwhelmed by the technical k

Jun 1, 20264 min read
Ai Coding Tools

How to Write Code 2x Faster Using AI Coding Tools

How to Write Code 2x Faster Using AI Coding Tools (2026) As a solo founder or indie hacker, you’re probably juggling multiple projects while trying to write code efficiently. The p

Jun 1, 20264 min read
Ai Coding Tools

Why GitHub Copilot Isn't the Best Choice for Every Project

Why GitHub Copilot Isn't the Best Choice for Every Project In 2026, GitHub Copilot is still a hot topic among developers, but is it the right fit for every project? As indie hacker

Jun 1, 20264 min read
Ai Coding Tools

Cursor vs. Codeium: Which AI Tool Improves Your Coding Speed More?

Cursor vs. Codeium: Which AI Tool Improves Your Coding Speed More? In 2026, the landscape of AI coding tools is crowded, but two names stand out: Cursor and Codeium. As a solo foun

Jun 1, 20263 min read