diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 49e36288f..860fce9e8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,6 +13,13 @@ // Use 'appPort' to create a container with published ports. If the port isn't working, be sure // your server accepts connections from all interfaces (0.0.0.0 or '*'), not just localhost. // "appPort": [], + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [5073], + // "portsAttributes": { + // "5073": { + // "protocol": "https" + // } + // }, // Uncomment the next line to run commands after the container is created. // "postCreateCommand": "rustc --version", diff --git a/docs/codespaces.md b/docs/codespaces.md new file mode 100644 index 000000000..34618ad0f --- /dev/null +++ b/docs/codespaces.md @@ -0,0 +1,29 @@ +Launching the SDK in github Codespaces +======== + +> Note: These instructions do not include anything about + +Browse to the folder +```sh +cd src/CarbonAware.WebApi/src/ +``` + +Run the project +```sh +dotnet run +``` + +It should look like that + +![sceenshot of the terminal view starting the webapi in codespaces](./images/codespaces-terminal-1.png) + +You can then select the browser icon to open in the browser + +![codespaces port tab](./images/codespaces-ports-1.png) + +> Note: the URL to browse needs to have that format: https:///swagger + +Make sure to browser to the swagger UI by appending `/swagger` to the URL, and the following should open. + +![sceenshot of the browser view starting the webapi and navigating to the Swagger UI](./images/codespaces-browser-1.png) + diff --git a/docs/images/codespaces-browser-1.png b/docs/images/codespaces-browser-1.png new file mode 100644 index 000000000..70f2a1437 Binary files /dev/null and b/docs/images/codespaces-browser-1.png differ diff --git a/docs/images/codespaces-ports-1.png b/docs/images/codespaces-ports-1.png new file mode 100644 index 000000000..5bc5fd48a Binary files /dev/null and b/docs/images/codespaces-ports-1.png differ diff --git a/docs/images/codespaces-terminal-1.png b/docs/images/codespaces-terminal-1.png new file mode 100644 index 000000000..73c59ef52 Binary files /dev/null and b/docs/images/codespaces-terminal-1.png differ