Ai Coding Tools

How to Use GitHub Copilot to Code Your First Web App in 2 Hours

By BTW Team4 min read

How to Use GitHub Copilot to Code Your First Web App in 2 Hours

If you're an indie hacker or a solo founder, the thought of coding your first web app can be daunting. With so many frameworks, languages, and tools out there, where do you even begin? Enter GitHub Copilot: an AI-powered coding assistant that can help you get your web app off the ground in just two hours. But is it really that straightforward? Let's dive into how you can leverage GitHub Copilot effectively while being realistic about its capabilities and limitations.

Prerequisites: What You Need to Get Started

Before we jump in, here’s what you’ll need to have ready:

  1. GitHub Account: You’ll need a GitHub account to access Copilot.
  2. Visual Studio Code: Download and install VS Code, as Copilot works as an extension here.
  3. Node.js: Install Node.js for backend development (if you're building a full-stack app).
  4. Basic HTML/CSS/JavaScript Knowledge: Familiarity with these languages will help you understand the suggestions Copilot provides.

Step 1: Setting Up GitHub Copilot

  1. Install Visual Studio Code: Go to the VS Code website and download the version compatible with your operating system.
  2. Add GitHub Copilot Extension: Open VS Code, go to Extensions (Ctrl+Shift+X), and search for "GitHub Copilot". Click "Install".
  3. Sign In: Follow the prompts to sign into your GitHub account and authorize Copilot.

Expected Output: You should see a Copilot icon in the bottom right corner of VS Code, indicating it's ready to assist.

Step 2: Start Coding Your Web App

Now, let’s create a simple web app—a to-do list. This will keep things manageable and practical.

  1. Create a New Project: Open a new folder in VS Code and create an index.html file.
  2. Set Up Basic HTML Structure: Start typing an HTML boilerplate. Copilot will suggest code snippets. Accept the suggestions by hitting "Tab".

Expected Output: A basic HTML structure should appear.

  1. Add CSS: Create a styles.css file and start typing CSS rules. Copilot will help you with suggestions for styling.

  2. JavaScript Functionality: Create a script.js file. Begin typing a function to add tasks to the to-do list. Copilot will provide suggestions based on your comments.

Expected Output: You should have a functional to-do list with the ability to add and remove tasks.

Step 3: Troubleshooting Common Issues

Even with Copilot's help, you might run into some issues. Here are some common ones and how to address them:

  • Suggestion Not Relevant: Sometimes, Copilot suggests code that doesn't fit your needs. In that case, just ignore the suggestion and write your own code.
  • Syntax Errors: If you encounter errors, double-check the suggestions. Copilot isn't perfect and can suggest incorrect syntax.
  • Performance Issues: If your app feels slow, ensure you’re not loading too many libraries unnecessarily.

Step 4: Testing Your Web App

Once you've built your app, it's time to test it. Open index.html in your browser and interact with your to-do list. Check that adding and removing tasks works as expected.

What's Next: Building Upon Your Foundation

Congratulations! You've built a simple web app in two hours using GitHub Copilot. Here’s what you can do next:

  • Add More Features: Consider adding local storage to save tasks between sessions.
  • Explore Frameworks: Look into frameworks like React or Vue.js for more complex projects.
  • Deploy Your App: Use platforms like Vercel or Netlify to host your web app.

Conclusion: Start Here

GitHub Copilot is a powerful tool that can speed up your coding process significantly, especially for beginners. However, it’s important to remember that it’s not a substitute for learning the fundamentals. Use it as a guide, but don’t rely solely on its suggestions.

If you're looking to build your first web app, follow these steps and keep iterating.

What We Actually Use

In our experience, we rely on GitHub Copilot for quick iterations and code suggestions, but we also have a solid understanding of JavaScript and HTML/CSS to guide our development. This combination has worked well for us when building projects efficiently.

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

AI Tools in Coding: Bolt.new vs GitHub Copilot - Which Is Better in 2026?

AI Tools in Coding: Bolt.new vs GitHub Copilot Which Is Better in 2026? As a solo founder navigating the everevolving landscape of coding, I’ve often found myself grappling with t

Mar 15, 20263 min read
Ai Coding Tools

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

Cursor vs GitHub Copilot: Which AI Tool is Better for Indie Developers in 2026? As an indie developer, you’re likely juggling multiple projects, often working solo or in small team

Mar 15, 20263 min read
Ai Coding Tools

How to Enhance Your Coding Skills Using AI Tools in Just 30 Days

How to Enhance Your Coding Skills Using AI Tools in Just 30 Days In 2026, the coding landscape is evolving rapidly, and leveraging AI tools can supercharge your learning process. B

Mar 15, 20264 min read
Ai Coding Tools

AI Coding Tools Comparison: GitHub Copilot vs Cursor - Which is Better in 2026?

AI Coding Tools Comparison: GitHub Copilot vs Cursor Which is Better in 2026? In the everevolving world of software development, AI coding tools have become essential for indie ha

Mar 15, 20263 min read
Ai Coding Tools

Comparing GitHub Copilot vs Codeium: Which AI Tool is Right for You in 2026?

Comparing GitHub Copilot vs Codeium: Which AI Tool is Right for You in 2026? As a solo founder or indie hacker, choosing the right AI coding tool can feel daunting—especially with

Mar 15, 20263 min read
Ai Coding Tools

How to Use GitHub Copilot to Write Your First Code in Under 2 Hours

How to Use GitHub Copilot to Write Your First Code in Under 2 Hours If you're a beginner looking to dive into coding but feel overwhelmed by the complexity, you're not alone. Many

Mar 15, 20263 min read