Skip to content

Commit b6ab3d3

Browse files
authored
Merge pull request #11 from ChrisRomp/codespaces-prep
Codespaces Setup
2 parents 55d1db4 + 9bccbb8 commit b6ab3d3

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

.devcontainer/devcontainer.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/universal
3+
{
4+
"name": "GitHub Copilot Extensions Codespace",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
11+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
12+
"forwardPorts": [
13+
"3000:3000"
14+
],
15+
"portsAttributes": {
16+
"3000": {
17+
"label": "Copilot-Extension-Service",
18+
"onAutoForward": "silent"
19+
}
20+
},
21+
22+
// Use 'postCreateCommand' to run commands after the container is created.
23+
"postCreateCommand": "npm install",
24+
25+
// Configure tool-specific properties.
26+
"customizations": {
27+
"vscode": {
28+
"extensions": [
29+
"GitHub.copilot"
30+
]
31+
}
32+
}
33+
34+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
35+
// "remoteUser": "root"
36+
}

.vscode/launch.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Launch Copilot Extension Service",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"runtimeExecutable": "npm",
15+
"runtimeArgs": ["start"]
16+
}
17+
]
18+
}

index.js

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import { Readable } from "node:stream";
44

55
const app = express()
66

7+
app.get("/", (req, res) => {
8+
res.send("Ahoy, matey! Welcome to the Blackbeard Pirate GitHub Copilot Extension!")
9+
});
10+
711
app.post("/", express.json(), async (req, res) => {
812
// Identify the user, using the GitHub API token provided in the request headers.
913
const tokenForUser = req.get("X-GitHub-Token");

0 commit comments

Comments
 (0)