Ai Coding Tools

How to Use GitHub Copilot for Your First Project in Under 2 Hours

By BTW Team3 min read

How to Use GitHub Copilot for Your First Project in Under 2 Hours

If you're just starting out in coding or looking to speed up your development process, GitHub Copilot can feel like magic. But diving into a tool like this can be intimidating, especially when you’re trying to ship your first project. In this guide, I’ll show you how to leverage GitHub Copilot to get your first project off the ground in under 2 hours. We’ll go step-by-step, so you can focus on building, not just learning.

Prerequisites

Before diving in, here’s what you need:

  1. GitHub Account: If you don’t have one, sign up for free.
  2. Visual Studio Code: Download and install this code editor.
  3. GitHub Copilot Subscription: As of June 2026, it’s $10/month after a free trial.
  4. Basic Knowledge of JavaScript: Familiarity with the language will help, but Copilot can assist you along the way.

Step 1: Install GitHub Copilot

  1. Open Visual Studio Code.
  2. Go to the Extensions tab (or press Ctrl + Shift + X).
  3. Search for "GitHub Copilot" and click "Install."
  4. Sign in with your GitHub account to activate your subscription.

Expected Output: A small GitHub Copilot icon will appear in the editor, indicating it’s ready to help.

Step 2: Start Your Project

  1. Create a new folder for your project.
  2. Open the terminal in VS Code and run npm init -y to set up a new Node.js project.
  3. Install any dependencies you might need. For example, if you’re building a simple web app, you might want to run:
    npm install express
    

Expected Output: Your package.json file should now include Express as a dependency.

Step 3: Write Your First Code with Copilot

  1. Create a new file called app.js.
  2. Start typing a simple Express server setup. For instance, type const express = require('express'); and then start a new line with const app = express();.
  3. Watch as Copilot suggests code. Accept the suggestions by pressing Tab.

Example Code Snippet

const express = require('express');
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: A functional Express server that displays "Hello World!" when accessed via the browser.

Step 4: Test Your Application

  1. In the terminal, run:
    node app.js
    
  2. Open your browser and go to http://localhost:3000.

Expected Output: You should see "Hello World!" displayed in your browser.

Troubleshooting Common Issues

  • Copilot Doesn't Suggest Code: Ensure you’re signed in, and that the extension is enabled.
  • Server Not Starting: Double-check your code for any syntax errors or missing dependencies.

What's Next?

Once you’ve got your basic app running, consider adding features like routing, middleware, or database integration. GitHub Copilot can help you write these as well. Check out the documentation for Express and other libraries to see how you can extend your project.

Conclusion: Start Here

Using GitHub Copilot effectively can significantly reduce the time it takes to build your first project. With just a few steps, you can go from zero to a working application in under 2 hours. If you encounter challenges, remember that Copilot is a tool to assist you, not a replacement for understanding your code.

What We Actually Use

In our experience, GitHub Copilot is great for generating boilerplate code quickly, but remember it won't always write perfect solutions. Always review and test the code it suggests. If you’re looking for alternatives, tools like Tabnine and Codeium are worth exploring, especially if you want different perspectives on coding assistance.

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 AI Coding Tools That Will Drastically Reduce Your Debugging Time

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time As a developer, whether you're just starting out or have years of experience, debugging can feel like a neverend

Oct 16, 20265 min read
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