// This file is what makes the green "Create codespace" button do something sensible.
// It is one of the examples the guide talks about: open it, read it, change it.
// (Comments are allowed in this file; most .json files don't permit them.)
{
  "name": "Your own GitHub",

  // The computer the codespace starts from. This one already has Node, which the
  // preview server and the site check use. With no file at all, GitHub picks a bigger
  // default image that also works.
  "image": "mcr.microsoft.com/devcontainers/javascript-node:22",

  // The preview server listens here; Codespaces turns it into a web address for you.
  "forwardPorts": [4179],
  "portsAttributes": {
    "4179": { "label": "The guide", "onAutoForward": "openPreview" }
  },

  // Runs each time the editor connects. Nothing is installed; it only says what to type next.
  "postAttachCommand": "echo 'Preview: node scripts/serve.js   Check: node scripts/check-site.js'"
}
