diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..aad89f8 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,36 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/universal +{ + "name": "GitHub Copilot Extensions Codespace", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/universal:2-linux", + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [ + "3000:3000" + ], + "portsAttributes": { + "3000": { + "label": "Copilot-Extension-Service", + "onAutoForward": "silent" + } + }, + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "npm install", + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "GitHub.copilot" + ] + } + } + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..bcd3141 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch Copilot Extension Service", + "skipFiles": [ + "/**" + ], + "runtimeExecutable": "npm", + "runtimeArgs": ["start"] + } + ] +} \ No newline at end of file diff --git a/index.js b/index.js index f3cc147..db71670 100644 --- a/index.js +++ b/index.js @@ -4,6 +4,10 @@ import { Readable } from "node:stream"; const app = express() +app.get("/", (req, res) => { + res.send("Ahoy, matey! Welcome to the Blackbeard Pirate GitHub Copilot Extension!") +}); + app.post("/", express.json(), async (req, res) => { // Identify the user, using the GitHub API token provided in the request headers. const tokenForUser = req.get("X-GitHub-Token");