Ai Coding Tools

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

By BTW Team4 min read

How to Build Your First Project Using GitHub Copilot in 2026

Building your first project can be daunting, especially if you're new to coding. You might feel overwhelmed by the vast array of tools and resources out there. Enter GitHub Copilot, an AI-powered coding assistant that can help you write code faster and more efficiently. In this guide, I’ll show you how to leverage GitHub Copilot to build your first project in just 2 hours.

Prerequisites: What You Need Before You Start

Before diving in, make sure you have the following:

  1. GitHub Account: Sign up for free at GitHub.
  2. Visual Studio Code: Download and install VS Code.
  3. GitHub Copilot Subscription: Copilot costs $10/month or $100/year after a free trial period.
  4. Basic Understanding of JavaScript: Familiarity with basic syntax will help, but don't worry—Copilot can assist you along the way.

Step 1: Set Up Your Development Environment (30 minutes)

  1. Install Visual Studio Code: Open the installer and follow the prompts to complete the installation.
  2. Install GitHub Copilot:
    • Open VS Code.
    • Go to Extensions (Ctrl+Shift+X).
    • Search for "GitHub Copilot" and click "Install."
  3. Sign In to GitHub: After installation, sign in to your GitHub account within VS Code to activate Copilot.

Expected output: You should see a GitHub Copilot icon in the bottom right of your VS Code window, indicating that it’s ready to assist you.

Step 2: Create Your First Project (30 minutes)

  1. Create a New Folder: Name it something relevant like my-first-project.

  2. Open Terminal in VS Code: Go to Terminal > New Terminal.

  3. Initialize a New Node.js Project:

    npm init -y
    

    This sets up a basic package.json file for your project.

  4. Install Express (a web framework for Node.js):

    npm install express
    

Expected output: You should now have a node_modules folder and a package.json file in your project directory.

Step 3: Write Your First Code with Copilot (45 minutes)

  1. Create an index.js File: This will be your main application file.
  2. Start Writing Code: Begin with a simple Express server. Type the following line:
    const express = require('express');
    
    As you type, Copilot will suggest code completions. Accept the suggestions by pressing Tab.
  3. Build Your Server: Continue writing code to set up your server. Here’s a basic structure:
    const app = express();
    const PORT = process.env.PORT || 3000;
    
    app.get('/', (req, res) => {
        res.send('Hello World!');
    });
    
    app.listen(PORT, () => {
        console.log(`Server is running on port ${PORT}`);
    });
    

Expected output: Once you run the server with node index.js, you should see "Server is running on port 3000" in your terminal.

Step 4: Troubleshooting Common Issues (15 minutes)

  • Copilot Isn’t Suggesting Code: Ensure you're logged into GitHub and that the Copilot extension is enabled.
  • Errors in Code: If you get a syntax error, double-check your code. Copilot may not always provide perfect suggestions.
  • Server Not Starting: Make sure you've installed Express and that your index.js file has the correct code.

Step 5: What's Next? (10 minutes)

  1. Add More Routes: Expand your application by creating more routes. For example, add a /about route that returns a brief description of your project.
  2. Deploy Your Project: Consider deploying your project using platforms like Vercel or Heroku for free.
  3. Explore More Features: Look into using Copilot for more advanced coding tasks, such as integrating a database or using middleware.

Conclusion: Start Here

Building your first project using GitHub Copilot is not only possible, but it can also be a lot of fun. By following these steps, you can leverage AI to speed up your coding process and enhance your learning experience. If you're serious about taking your coding skills to the next level, I highly recommend starting with Copilot.

Remember, practice makes perfect. The more you use GitHub Copilot, the better you'll get at understanding how to work with it effectively.

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 Write Code with AI Assistance in Just 1 Hour

How to Write Code with AI Assistance in Just 1 Hour You’ve probably heard the hype around AI assisting in code writing, but if you’re like many indie hackers, the idea of diving in

Apr 15, 20264 min read
Ai Coding Tools

AI Coding Tools Showdown: Cursor vs Codeium – Which One Reigns Supreme?

AI Coding Tools Showdown: Cursor vs Codeium – Which One Reigns Supreme? As developers, we often find ourselves lost in the sea of code, battling deadlines while trying to maintain

Apr 15, 20263 min read
Ai Coding Tools

How to Boost Your Coding Speed with AI Tools in 60 Minutes

How to Boost Your Coding Speed with AI Tools in 60 Minutes As indie hackers and side project builders, we often find ourselves stuck in the trenches of coding, trying to crank out

Apr 15, 20264 min read
Ai Coding Tools

Why GitHub Copilot is Overrated: 5 Points to Consider

Why GitHub Copilot is Overrated: 5 Points to Consider In 2026, many indie hackers and solo founders are still raving about GitHub Copilot, positioning it as a musthave AI coding to

Apr 15, 20263 min read
Ai Coding Tools

Bolt.new vs GitHub Copilot: Which AI Coding Assistant is Worth Your Money?

Bolt.new vs GitHub Copilot: Which AI Coding Assistant is Worth Your Money? As a solo founder or indie hacker, you’re probably juggling multiple tasks while trying to build your nex

Apr 15, 20263 min read
Ai Coding Tools

How to Implement AI Tools in Your Coding Workflow in 14 Days

How to Implement AI Tools in Your Coding Workflow in 14 Days Integrating AI tools into your coding workflow can feel overwhelming, especially when you’re juggling multiple projects

Apr 15, 20264 min read