Skip to content

Commit

Permalink
Merge pull request #11 from ChrisRomp/codespaces-prep
Browse files Browse the repository at this point in the history
Codespaces Setup
  • Loading branch information
D1M1TR10S authored Dec 16, 2024
2 parents 55d1db4 + 9bccbb8 commit b6ab3d3
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
}
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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": [
"<node_internals>/**"
],
"runtimeExecutable": "npm",
"runtimeArgs": ["start"]
}
]
}
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit b6ab3d3

Please sign in to comment.