Ai Coding Tools

How to Create a Simple Web App Using GitHub Copilot in Under 2 Hours

By BTW Team4 min read

How to Create a Simple Web App Using GitHub Copilot in Under 2 Hours

If you’re like many indie hackers and solo founders, you know the struggle of building a web app from scratch. It can feel overwhelming, especially if you’re not a seasoned developer. But what if I told you that you could leverage AI to speed up the process? In 2026, GitHub Copilot has become a powerful tool for developers, and you can create a simple web app in under 2 hours using it. Here’s how.

Prerequisites: Tools You’ll Need

Before we dive in, make sure you have the following tools and accounts set up:

  1. GitHub Account: Sign up for free at GitHub.
  2. Visual Studio Code: Download it from Visual Studio Code.
  3. Node.js: Install it from Node.js (make sure to get the LTS version).
  4. GitHub Copilot Subscription: Pricing starts at $10/month for individuals.

Step 1: Set Up Your Development Environment

  1. Install Visual Studio Code: Open the installer and follow the prompts.
  2. Install Node.js: This includes npm, which you’ll need for managing packages.
  3. Install GitHub Copilot: In Visual Studio Code, go to Extensions and search for "GitHub Copilot." Click "Install."

Expected output: You should see a Copilot icon in your VS Code sidebar.

Step 2: Create a New Project

  1. Open a terminal in VS Code.

  2. Run the following commands to create a new directory and navigate into it:

    mkdir my-web-app
    cd my-web-app
    
  3. Initialize a new Node.js project:

    npm init -y
    

Expected output: A package.json file will be created in your project directory.

Step 3: Install Express.js

  1. Still in the terminal, install Express.js, a minimal web framework for Node.js:

    npm install express
    

Expected output: You should see Express added to your package.json dependencies.

Step 4: Create Your Server

  1. Create a new file called server.js in your project folder.

  2. Use GitHub Copilot to generate the basic server code. Type // Create a simple Express server and let Copilot suggest the code.

    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 http://localhost:${PORT}`);
    });
    

Expected output: When you run node server.js, you should see "Server is running on http://localhost:3000".

Step 5: Test Your Web App

  1. Open a browser and navigate to http://localhost:3000.
  2. You should see "Hello, World!" displayed.

Troubleshooting: What Could Go Wrong

  • Error: Cannot find module 'express': Make sure you installed Express.js correctly.
  • Server not starting: Check if you saved the server.js file and if you’re in the right directory when running the command.

What’s Next: Expanding Your App

Now that you have a basic web app, consider adding features:

  • Static Files: Serve HTML, CSS, and JavaScript files.
  • API Endpoints: Create RESTful API endpoints.
  • Database Integration: Use MongoDB or Firebase for data persistence.

Tools Comparison: AI Coding Helpers

Here’s how GitHub Copilot stacks up against other AI coding tools available in 2026.

| Tool | Pricing | Best For | Limitations | Our Verdict | |---------------------|----------------------|-----------------------------------|--------------------------------------------------|-------------------------------| | GitHub Copilot | $10/mo | General coding assistance | Limited to supported languages | We use this for quick code generation. | | Tabnine | Free tier + $12/mo | JavaScript and TypeScript | Less effective for complex projects | We don't use this because it lacks context. | | Codeium | Free | Beginners learning to code | Limited advanced features | Skip if you’re experienced. | | Replit | Free tier + $20/mo | Collaborative coding | Requires internet for most features | We don’t use this for solo projects. | | Sourcery | $19/mo | Python code improvement | Focused on Python only | We don’t use this as we prefer JavaScript. | | AI Dungeon | Free | Story and game development | Not suitable for traditional app development | Not relevant for web apps. |

Conclusion: Start Here

To create a simple web app using GitHub Copilot in under 2 hours, follow the steps outlined above. With a bit of setup, you can leverage AI to streamline your coding process. Start by setting up your environment, then use Copilot to generate code snippets quickly.

If you encounter limitations, don’t hesitate to explore the alternatives listed above.

Ready to build? Grab your tools, and let’s get coding!

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 Common Mistakes When Using AI Programming Assistants

10 Common Mistakes When Using AI Programming Assistants As a solo founder or indie hacker, you might be tempted to jump into the world of AI programming assistants, thinking they w

Apr 24, 20264 min read
Ai Coding Tools

How to Slash Your Development Time by 50% Using AI Coding Tools

How to Slash Your Development Time by 50% Using AI Coding Tools (2026) As indie hackers and solo founders, every minute counts when we're building our projects. If you've been in t

Apr 24, 20264 min read
Ai Coding Tools

AI Coding Tools: ChatGPT vs GitHub Copilot – Which Is Better for Developers?

AI Coding Tools: ChatGPT vs GitHub Copilot – Which Is Better for Developers? As a developer in 2026, you might find yourself overwhelmed by the vast array of AI coding tools availa

Apr 24, 20263 min read
Ai Coding Tools

How to Write a Function in 5 Minutes Using AI

How to Write a Function in 5 Minutes Using AI If you're a solo founder, indie hacker, or just someone dabbling with code, the thought of writing a function can be daunting. You’ve

Apr 24, 20264 min read
Ai Coding Tools

Cursor vs Codeium: Which AI Coding Tool is Best for Experts in 2026?

Cursor vs Codeium: Which AI Coding Tool is Best for Experts in 2026? As a developer, you know that the right tools can make or break your productivity. With AI coding tools like Cu

Apr 24, 20263 min read
Ai Coding Tools

Supabase vs Firebase: The Best AI Database for Your 2026 Project

Supabase vs Firebase: The Best AI Database for Your 2026 Project As we dive into 2026, the landscape of AI databases is more competitive than ever, with founders and indie hackers

Apr 24, 20264 min read