Ai Coding Tools

How to Create a Simple Web App Using AI Coding Assistants in 2 Hours

By BTW Team4 min read

Comparing tools? See the AI tools tested on the show.

In short

A step-by-step tutorial for new developers on how to build a functional web app within 2 hours using popular AI coding tools like GitHub Copilot and Cursor.

Building a web app can feel daunting, especially if you’re a solo founder or indie hacker with limited coding experience. But what if I told you that with the right AI coding assistants, you could whip up a simple web app in just two hours? In 2026, AI tools have come a long way, making it possible for beginners to create functional applications without writing every line of code from scratch.

Prerequisites: What You Need to Get Started

Before diving into the build, here’s what you’ll need:

  • Basic knowledge of HTML/CSS and JavaScript: You don’t need to be an expert, but understanding the basics will help.
  • A GitHub account: For version control and collaboration.
  • Node.js installed on your system: This will help you run your JavaScript code locally.
  • Access to an AI coding assistant: We’ll be using GitHub Copilot for this tutorial.

Step 1: Setting Up Your Development Environment

  1. Install Node.js: Visit Node.js and download the latest version. Installation is straightforward; just follow the prompts.

  2. Create a new project directory:

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

    npm init -y
    

    This creates a package.json file with default settings.

  4. Install Express.js: This is a web framework for Node.js that simplifies the process of building web applications.

    npm install express
    

Step 2: Using GitHub Copilot to Generate Code

  1. Open your code editor: We recommend using Visual Studio Code.

  2. Enable GitHub Copilot: Make sure you have the GitHub Copilot extension installed and activated.

  3. Create a new file called app.js: This file will hold the main logic of your web app.

  4. Start coding with Copilot:

    • Begin by typing a comment like // create an Express server and Copilot will suggest the necessary code to set up your server. Accept the suggestion.
    • Next, type // create a simple route that returns "Hello World" and let Copilot do the rest.
  5. Run your application: In the terminal, execute:

    node app.js
    

    Open your browser and navigate to http://localhost:3000 to see your "Hello World" message.

Step 3: Adding Functionality

  1. Create a form: In a new file called index.html, use Copilot to generate a simple HTML form. Start with a comment like // create a simple HTML form.

  2. Connect the HTML form to your Express server: Modify your app.js to serve the HTML file and handle form submissions.

  3. Test your app: Make sure the form submits data correctly and displays a success message.

Step 4: Troubleshooting Common Issues

  • If your server doesn't start: Double-check that you have all dependencies installed and that your code doesn't contain syntax errors.
  • Form not submitting: Ensure that your form's action attribute points to the correct route in your Express server.

What Could Go Wrong

  • Missing dependencies: If you forget to install Express, your server won't run. Double-check the package.json file.
  • Typos in code: AI suggestions are helpful, but they may not be perfect. Always review and test the generated code.

What's Next: Scaling Your Web App

Now that you have a basic web app, consider adding features like user authentication or a database connection. Explore tools like Firebase for easy backend integration or Stripe for payment processing.

Comparison of AI Coding Assistants

Here’s a breakdown of some popular AI coding assistants you might consider:

| Tool | Pricing | Best For | Limitations | Our Take | |-----------------|------------------------------|------------------------------------|------------------------------------------|--------------------------------| | GitHub Copilot | $10/month | JavaScript/Node.js development | Limited support for non-English languages | We use this for quick prototypes. | | TabNine | Free + $12/month Pro | Multi-language coding | Requires manual setup for some features | Great for multi-language support. | | Codeium | Free | Beginner-friendly suggestions | Less robust than Copilot | We don’t use this because it lacks advanced features. | | Replit | Free + $7/month Pro | Collaborative coding | Limited offline capabilities | We don’t use this because we prefer local setups. | | Sourcery | Free + $19/month Pro | Python development | Focused only on Python | We don’t use this since we focus on JavaScript. | | OpenAI Codex | $0-20/month (varies) | General coding tasks | API access required | We use this for specific tasks like API integration. |

Conclusion: Start Here

If you’re looking to build a simple web app quickly, GitHub Copilot is your best bet. It’s beginner-friendly and integrates smoothly into your workflow. Remember, you can always iterate and enhance your app as you grow more comfortable with coding.

Ready to dive in? Set up your environment and start building with AI coding assistants today!

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools
Ai Coding Tools

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them)

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them) In the everevolving landscape of AI coding tools, it's easy to get swept up in the hype. As indie hackers and s

Nov 30, 20263 min read
Ai Coding Tools

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026 In 2026, the landscape for indie hackers and solo founders has evolved significantly, especially with the advent

Nov 26, 20264 min read
Ai Coding Tools

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026 If you’re a developer stuck maintaining legacy code, you know the frustration. It’s like navigating a maze blindfolde

Nov 23, 20264 min read
Ai Coding Tools

10 AI Coding Tools That Will Save You Hours of Debugging in 2026

10 AI Coding Tools That Will Save You Hours of Debugging in 2026 Debugging can feel like a neverending cycle of frustration. Whether you're a solo founder or an indie hacker, spend

Nov 18, 20265 min read
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for MVP Development

10 Common Mistakes When Using AI Coding Tools for MVP Development As a founder in 2026, you’re likely aware that AI coding tools can significantly speed up the MVP development proc

Nov 16, 20264 min read
Ai Coding Tools

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026 As a beginner developer, you’ve probably come across a ton of buzz surrounding AI coding tools. But with all the hyp

Nov 12, 20263 min read