How to Use GitHub Copilot to Code Your First Simple App in 1 Hour
How to Use GitHub Copilot to Code Your First Simple App in 1 Hour
For many indie hackers and side project builders, the idea of coding an app can be daunting. You might think you need years of experience or advanced knowledge to get started. But what if I told you that with a tool like GitHub Copilot, you can build a simple app in about an hour? In 2026, this AI-powered coding assistant has become a game-changer for developers at all levels, especially for those of us who are just starting out.
Prerequisites
Before diving in, let’s make sure you have everything you need to get started:
- GitHub Account: If you don’t have one, sign up for free at GitHub.com.
- Visual Studio Code (VS Code): Download and install VS Code, which is a popular code editor.
- GitHub Copilot Subscription: GitHub Copilot costs $10/month or $100/year after a free trial. Make sure to sign up for the trial to test it first.
- Basic Understanding of JavaScript: While Copilot can help a lot, having a basic grasp of JavaScript will make the process smoother.
Step 1: Set Up Your Environment (10 minutes)
- Install VS Code: If you haven’t already, install Visual Studio Code.
- Install GitHub Copilot: Open VS Code, go to extensions (Ctrl+Shift+X), and search for "GitHub Copilot". Click "Install".
- Sign In to GitHub: Once installed, you’ll need to sign in to your GitHub account to activate Copilot.
Step 2: Create a New Project (10 minutes)
- Open a New Folder: In VS Code, create a new folder for your project.
- Initialize a Git Repository: Open the terminal (Ctrl+
) and rungit init` to initialize a new Git repository. - Create an HTML File: Create a new file named
index.html.
Step 3: Write Your First Code with Copilot (30 minutes)
- Start Coding: Begin typing a simple HTML structure in
index.html. As you type, Copilot will suggest code. For example, start with:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Simple App</title> </head> <body> <h1>Hello World</h1> </body> </html> - Add Interactivity: Next, create a
script.jsfile for JavaScript. Start typing a function, like:
Copilot will suggest the rest. Just hitfunction greet() { alert("Welcome to my simple app!"); }Tabto accept its suggestions. - Link Your JavaScript: Make sure to link your
script.jsin your HTML file. Type<script src="script.js"></script>right before the closing</body>tag.
Step 4: Preview Your App (5 minutes)
- Open Live Server: Install the Live Server extension in VS Code.
- Start Live Server: Right-click on
index.htmland select "Open with Live Server". This will launch your app in the browser. - Test It: Click anywhere on the page to see your greeting alert.
Troubleshooting
- Copilot Not Suggesting: If Copilot isn’t providing suggestions, make sure you’re connected to the internet and logged into your GitHub account.
- Code Errors: If your app doesn’t work, check for typos in your code, especially in your script linking.
What’s Next?
Now that you have your first app up and running, consider expanding it. Add CSS for styling, or try incorporating more JavaScript functionality. You could also explore backend options like Node.js or Firebase to make your app more dynamic.
Conclusion
Using GitHub Copilot, you can create a simple app in just about an hour. It’s an invaluable tool for anyone looking to get started with coding without feeling overwhelmed.
Start here: If you’re new to coding, I recommend following this tutorial step-by-step and experimenting with Copilot’s suggestions. You’ll be surprised at how quickly you can build something functional.
Follow Our Building Journey
Weekly podcast episodes on tools we're testing, products we're shipping, and lessons from building in public.