How to Build Your First Simple App with GitHub Copilot in 2 Hours
How to Build Your First Simple App with GitHub Copilot in 2026
Building your first app can feel overwhelming, especially if you're new to coding. You might be thinking, "I don't have the time or expertise to make this happen." But what if I told you that with the right tools, you could build a simple app in just two hours? Enter GitHub Copilot, an AI-powered coding assistant that can significantly speed up your development process. In this guide, I’ll walk you through how to leverage GitHub Copilot to create a basic app quickly and efficiently.
Prerequisites
Before you dive in, make sure you have the following:
- A GitHub account: Free tier is sufficient.
- Visual Studio Code (VS Code): Download and install it from Visual Studio's website.
- GitHub Copilot subscription: $10/month after a 60-day free trial.
- Basic understanding of JavaScript: This guide assumes you have some familiarity with coding.
Time Estimate: 2 Hours
You can finish this project in about two hours if you follow the steps closely. Let's get started!
Step 1: Set Up Your Environment
-
Install GitHub Copilot:
- Open VS Code and go to the Extensions view.
- Search for "GitHub Copilot" and click "Install".
- Sign in with your GitHub account and enable Copilot.
-
Create a New Project:
- Open your terminal in VS Code.
- Run
mkdir my-first-app && cd my-first-appto create a new directory. - Initialize a new Node.js project by running
npm init -y.
Step 2: Write Your Code
Building a Simple To-Do List App
-
Create the Main File:
- Create a new file called
app.js. - Start writing a simple function to display a welcome message using Copilot:
// Start typing: "function welcomeMessage() {"
- Create a new file called
-
Use GitHub Copilot to Generate Code:
- As you type, GitHub Copilot will suggest code. Accept the suggestions by pressing
Tab. - Implement a basic to-do list functionality. For example:
const tasks = []; function addTask(task) { tasks.push(task); console.log(`Added: ${task}`); } function showTasks() { console.log('Current Tasks:', tasks); }
- As you type, GitHub Copilot will suggest code. Accept the suggestions by pressing
Expected Output
When you run node app.js, you should see the welcome message and any tasks you add to the list in the console.
Step 3: Run Your App
- Run the Application:
- In the terminal, type
node app.jsto execute your script. - You should see your welcome message and any tasks you added printed out.
- In the terminal, type
Troubleshooting
- Error: "Cannot find module": Ensure you are in the correct directory and that your file is named correctly.
- Copilot not suggesting code: Make sure you are connected to the internet and that the GitHub Copilot extension is enabled.
What's Next?
Now that you have a basic app up and running, consider expanding its functionality. You could add features like:
- Task completion: Mark tasks as done.
- Persistent storage: Use local storage or a database to save tasks.
- User interface: Implement a simple front-end using HTML/CSS.
Conclusion: Start Here
If you're looking to build your first app quickly and efficiently, GitHub Copilot is a powerful ally. It can help you overcome blocks and generate code faster than you might do on your own. To get started, follow the steps outlined above, and don't hesitate to experiment with new features.
What We Actually Use
In our experience, we primarily use GitHub Copilot for rapid prototyping and tackling repetitive coding tasks. It's especially useful when we're trying to implement common functions quickly.
Follow Our Building Journey
Weekly podcast episodes on tools we're testing, products we're shipping, and lessons from building in public.