Episode 3

Published on:

16th Sep 2022

"In the future I'll need to protect my pinky": GitHub Copilot writes a Node.js tutorial

Kerri and Ash go down a GitHub Copilot rabbit hole, but not for coding apps like you might expect!

Instead, they are exploring the possibilities of authoring technical tutorials for developers where 95% of the writing is done by AI/ML.

In this episode, you'll get to listen to *thrilling* audio content wherein Ash hits the tab button in VS Code until he's got a Node.js and Express tutorial written almost entirely by GitHub Copilot.

What does it all mean?! Kerri and Ash want to know!

  • Can GitHub Copilot do QA for an article that it mostly wrote on its own?
  • Could Copilot please just write a sample app, author the tutorial, then QA everything already thx?
  • Can we simply tab our way into writing bespoke tutorials for technologies we don't even know yet with GitHub Copilot?
  • Will humans still at least get to make the memes?

See below for the text of the article GitHub Copilot created (in proper Markdown!) based on a seed of 8–10 words provided by a soon-to-be-obsolete human, including the inexplicable link in the "Next steps" section to the Photoshop UXP API documentation.

Relax and enjoy this podcast, humans; the AIs can do the work now.


# Making a server with Node.js and Express

In this tutorial, we will make a simple server with Node.js and Express. We will also use the `express-generator` package to generate the project.

## Prerequisites

- Node.js

- npm

- Express

## Building the project

First, we will create a new project using the `express-generator` package. This package will generate a new project for us, and we can use it to create a new project.


$ npm install express-generator -g

$ express myapp

$ cd myapp

$ npm install


Now, we can run the project using the `npm start` command.


$ npm start


This will start the server on port 3000. We can now visit the server at `http://localhost:3000`.

## Adding a route

Now, we will add a new route to the server. We will add a new route to the `routes/index.js` file.


router.get("/hello", function (req, res, next) {

res.send("Hello World!");



Now, we can visit the route at `http://localhost:3000/hello`.

## Conclusion

In this tutorial, we learned how to make a simple server with Node.js and Express. We also learned how to use the `express-generator` package to generate a new project.

## Next steps

- [Making a server with Node.js and Express](https://developer.adobe.com/photoshop/uxp/2022/guides/getting-started/making-a-server-with-nodejs-and-express/)

## Resources

- [Node.js](https://nodejs.org/en/)

- [npm](https://www.npmjs.com/)

- [Express](https://expressjs.com/)

- [express-generator](https://www.npmjs.com/package/express-generator)

Listen for free

Show artwork for I'd Rather Be Scripting

About the Podcast

I'd Rather Be Scripting
Adventures in Technology Tangents
Ash and Kerri go on mostly random tangents about technology, music, photography, and just about anything else. You never know what you'll hear!

About your hosts

Ash Ryan Arnwine

Profile picture for Ash Ryan Arnwine
Here! #DevRel human. #JavaScript hacker. #vinyl newb. Life tourist.
 Wouldn't you rather be scripting?

Mastodon-don-don: https://indieweb.social/@ashryan

Kerri Shotts

Profile picture for Kerri Shotts
Principal Product Manager for UXP @Adobe, #JavaScript fangirl, Technical writer, Photographer, #Trans (she/her), #Atheist. All opinions are my own.

On Mastodon (@kerrishotts@mastodon.cloud): https://mastodon.cloud/@kerrishotts