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

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