Loading

T9 APIs · Lesson 3

Games: Express routing

Choose the right option, fill in the blanks, write small pieces of code and fix broken ones. Code runs in a safe box inside this page.

Solved 0 of 45 items in this lesson.

1 / 21

This program is an Express app and its own client, run in the shop's folder. What does it print?

cat > app.js <<'END'
const express = require("express");
const app = express();
app.get("/", (req, res) => res.send("front door"));
const server = app.listen(3000, async () => {
  const r = await fetch("http://localhost:3000/help");
  console.log(r.status);
  server.close();
});
END
node app.js

Back to the lesson