•  


Insider newsletter digest: Cook up a controller with GitHub Copilot - The GitHub Blog Skip to content

Insider newsletter digest: Cook up a controller with GitHub Copilot

Whether you're coding up a storm or cooking up code, building a controller function with AI is your secret sauce to a flavorful app.

Insider newsletter digest: Cook up a controller with GitHub Copilot
Author
This is abridged content from September 2023’s Insider newsletter. Like what you see? Sign up for the newsletter to receive complete, unabridged content in your inbox twice a month Sign up now >

Whether you’re a software architect, QA engineer, technical lead, or any other type of developer, you’ll most likely benefit from building a controller function in Node.js. A controller function is a specific piece of code within an application’s architecture—often found in the Model-View-Controller (MVC) pattern—that facilitates communication between the user and the underlying application logic.

Think of the controller function as the master chef in your code kitchen 🔥👨‍🍳. It takes in your ingredients (user input), works its culinary magic behind the scenes by interacting with the data model, and serves up a deliciously updated UI 🍽️. So, whether you’re coding up a storm or cooking up code, the controller function is your secret sauce to a flavorful application.

And here’s a little extra food for thought: did you know that you can build a controller on the fly with GitHub Copilot?

Follow this recipe to cook up your own controller function in Node.js with our new AI-pair programming tool:

  1. Install the GitHub Copilot extension
  2. Set up a new Node.js project and add instructions for GitHub Copilot.
  3. Define your controller function specifications.
  4. Leverage GitHub Copilot’s suggestions.
  5. Accept and implement the code recommendations by pressing TAB and ENTER.
  6. Add the required function details.
  7. Optimize error handling.
  8. Return API response.
  9. Review and validate the code.
  10. Update code to match your specific requirements.

One of our very own developer advocates, @LadyKerr , used this exact recipe to help concoct a GPT-3 application with GitHub Copilot that finds the nutritional content of any recipe with AI 🍜. You can find the source code and build it yourself here .

Or, if you’re a more visual learner, you can click through to follow the steps in this video:

Click on the image above to learn how to create a controller with GitHub Copilot.

Ready to whip up a controller function of your own? Let’s get cookin’ 🍴! Sign up for GitHub Copilot .

Want to receive content like this twice a month, right in your inbox? Sign up for the newsletter now >

Explore more from GitHub

Product

Product

Updates on GitHub products and features, hot off the press.
GitHub Universe 2024

GitHub Universe 2024

Get tickets to the 10th anniversary of our global developer event on AI, DevEx, and security.
GitHub Copilot

GitHub Copilot

Don't fly solo. Try 30 days for free.
Work at GitHub!

Work at GitHub!

Check out our current job openings.
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본